[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PerlSendHeader

Benjamin Reed wrote:
> I've turned off PerlSendHeader, but no matter what I do, it seems that I'm
> already getting headers before I ever print anything.
> I have the following in my httpd.conf:
> ---(snip!)---
> Alias /perl/ /home/httpd/perl/
> <Location /perl>
>  SetHandler perl-script
>  PerlHandler Apache::Registry
>  PerlSendHeader Off
>  Options Indexes ExecCGI
> </Location>
> ---(snip!)---
> If I have a script called /home/httpd/perl/index.pl with only the following:
> ---(snip!)---
> $|++;
> print <<END;
> Content-type: text/html
> Hi.
> ---(snip!)---
> I end up with "Content-type: text/html Hi." in the browser.

i had the same snag. i *think* what i was missing was that
the very first header that's included with 'perlSendHeaders on'
is "HTTP/1.1 200 OK" line.

check and see if your 'content-type' stuff is in a monospaced
font (courier, as opposed to times or helvetica). if it is,
that is, it looks like it's within <pre></pre> tags, then
it's been sent as plain text, not as html.

to double-check, put <b> or <i> in your output.

if it *is* just plain text, then apache didn't know what to
do with your output, perhaps because there was no "HTTP"
line, and bailed, telling the browser to expect text/plain
instead of what you intended.

maybe. just guessing.

Reply to: