Re: Connection Reset on Mandrake Linux 8.0 / Apache 1.3.20 / ModPerl1.26

2001-08-25 Thread Stas Bekman

> I guess the only thing I don't understand is why
> with PerlSendHeader Off, isnt the webserver supposed to send headers?
> Does it not because it doesn't know what kind of content a .pl file is?
> In that case, shouldn't it send DefaultType (text/plain) ?

http://perl.apache.org/guide/config.html#_Location_Configuration
(scroll down a bit)

_
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/





Re: Connection Reset on Mandrake Linux 8.0 / Apache 1.3.20 / ModPerl1.26

2001-08-25 Thread Stas Bekman

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/





Re: Connection Reset on Mandrake Linux 8.0 / Apache 1.3.20 / ModPerl1.26

2001-08-25 Thread Philip Mak

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)