----- Original Message -----
From: "Bill Moseley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 14, 2001 4:34 PM
Subject: Re: cgi_to_mod_perl manpage suggestion
> At 03:34 PM 03/14/01 +0200, Issac Goldstand wrote:
> >> On Tue, 13 Mar 2001, Andrew Ho wrote:
> >> > PH>Um, you're getting me confused now, but PerlSendHeader On means
that
> >> > PH>mod_perl WILL send headers.
> >
> > I still think that the above line is confusing: It is because mod_perl
is
> >not sending headers by itelf, but rather your script must provide the
> >headers (to be returned by mod_perl). However, when you just say
"mod_perl
> >will send headers" it is misleading; it seems to indeicate that mod_perl
> >will send "Content-Type: text/html\r\n\r\n" all by itself, and that
> >conversely, to disable that PerlSendHeaders should be Off.
>
> Read it again. You are confusing "some" headers with "all" headers --
> there's more than just Content-Type:.
>
> To me it doesn't sound at all like it will send content-type:
>
> PerlSendHeader On
>
> Now the response line and common headers will be sent
> as they are by mod_cgi.
> (response line and common headers != content type)
>
> And, just as with mod_cgi,
> PerlSendHeader will not send a terminating newline,
> your script must send that itself, e.g.:
> ---------------------------------
>
> print "Content-type: text/html\n\n";
>
>
> All documentation has room for improvement, of course. It's confusing if
> you haven't written a mod_perl content handler before (or haven't read the
> perldoc Apache or the Eagle book) and don't know that you need
> $r->send_http_header under a normal content handler. And if you are like
> me, you have to read the docs a few times before it all makes sense.
>
> Also, note that Apache::Registry lets reasonably well written CGI scripts
> to run under both mod_cgi and Apache::Registry, which is what that man
page
> is describing. It's not a CGI script if there's not a content-type:
header
> sent. And the docs are not implying that you can turn on PerlSendHeader
> and then go through all your CGI scripts and remove the print
> "Content-type: text/html\n\n" lines.
>
>
>
> Bill Moseley
> mailto:[EMAIL PROTECTED]
So basically, PerlSendHeaders On means that it will send information such as
the return code (eg HTTP/1.1 200 OK) ETag, Date and other headers that
Apache generally handles on its own under mod_cgi?
If so, then I think that all that really needs to be done is instead of
giving a small lecture on PerlSendHeader which will be confusing to newbies,
why not just write something basically telling them to set it to On and not
worry. Remember that this is just the porting manpage, and if people really
want to make their own handlers then they'll eventually learn the ins and
outs of PerlSendHeader.