# I need some help with browser output in ruby cgi - cgi.rb

**URL:** <https://www.ruby-forum.com/t/i-need-some-help-with-browser-output-in-ruby-cgi-cgi-rb/101484>\
**Category:** Ruby\
**Created:** [February 6, 2006, 8:13am UTC](https://www.ruby-forum.com/t/i-need-some-help-with-browser-output-in-ruby-cgi-cgi-rb/101484 "2006-02-06T08:13:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Professor\_Chen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@Professor\_Chen](https://www.ruby-forum.com/u/Professor_Chen)\
**Post date:** [February 6, 2006, 8:13am UTC](https://www.ruby-forum.com/t/i-need-some-help-with-browser-output-in-ruby-cgi-cgi-rb/101484/1 "2006-02-06T08:13:33Z")

</div>

## Whenever I try to send out some output in CGI my scripts generates an error 500 with

## Error message: malformed header from script. Bad header=.: dblist.cgi

I am not really sure how to output text with the cgi.pre,  
CGI::escapeHTML functions etc. Is there some guide to doing those  
things right?

PS. Is there some way I can the cgi to send the actual ruby error  
messages as part of the error 500 output?
