--- William McKee <[EMAIL PROTECTED]> wrote:
> To do it manually, use the following and set $mime_type to whatever 
> value you want (see W3C website for complete list):
>  print "Content-type: $mime_type\n";

With all due respect, your print statement is why I recommend to people that they 
should not do
this manually.  There should be two newlines at the end of that (actually a \r\n or 
\012\015, but
usually the Web server catches the error and corrects for it (something I have a 
serious beef
with, but that's just me (oh, and I use too many parentheses))).

It's those two newlines that allow the user agent to distinguish between the end of 
the headers
and the beginning of the entity-body.  By doing it manually, as opposed to letting 
CGI.pm handle
it, code is much more prone to errors.

I realize you mentioned your version of CGI.pm had a problem.  That's when you track 
down the
problem and fix it in one place rather than develop work-arounds that may turn into 
'do not
work-arounds'. :)

Cheers,
Curtis Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Reply via email to