On Sat, 25 Aug 2001, Philip Mak wrote:

> I tried telneting to your web server to see what's going on. Look at this:
>
> $ telnet www.nonserviam.net 80
> Trying 65.34.152.103...
> Connected to nonserviam.net.
> Escape character is '^]'.
> GET /modperl/index.pl HTTP/1.1
> Host: www.nonserviam.net
>
> Hello!Connection closed by foreign host.
>
> The HTTP server did not return a proper HTTP header, which is why lynx
> doesn't like it.
>
> Looking at your mod_perl configuration...
>
> >    PerlSendHeader Off
>
> Try doing it with PerlSendHeader On. You also might need to add this line
> at the beginning of your script:
>
> print "Content-type: text/plain\n\n";
>
> (or text/html)

I just wanted to add that you always have to send 'Content-type' header.
It's just that PerlSendHeader On reads your STDOUT, recognizes the header
at a cost (see the guide) and then sends it along with other headers. With
PerlSendHeader Off, you should use either CGI.pm or mod_perl native
methods to set the headers. It's all in the guide :)


_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Reply via email to