You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ken Fox <kf...@vulpes.com> on 2000/07/27 23:44:35 UTC
[Fwd: mod_perl_sent_header improvement]
Here's a patch that I sent to Doug. Not sure if I would
accept something from a guy who *clearly* can't read a
simple INSTALL file... ;) Here's hoping anyway.
- Ken
Re: [Fwd: mod_perl_sent_header improvement]
Posted by Ken Fox <kf...@vulpes.com>.
Ken Fox wrote:
> I was using $request->sent_header and found out that it's
> not terribly useful if PerlSendHeader is off -- sent_header
> always returns 1. I changed mod_perl_sent_header so that
> it returns 0, 1 or 2:
>
> 0 - headers have not been sent (PerlSendHeader on)
> 1 - headers have not been sent (PerlSendHeader off)
> 2 - headers have already been sent
[patch deleted]
I haven't heard anything about this patch. And the traffic on
modperl is killing my POP account... ;) Could somebody please
let me know if I need to do anything more to propose a change?
Thanks,
- Ken
Re: [Fwd: mod_perl_sent_header improvement]
Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 27 Jul 2000, Ken Fox wrote:
> Here's a patch that I sent to Doug. Not sure if I would
> accept something from a guy who *clearly* can't read a
> simple INSTALL file... ;) Here's hoping anyway.
if you need to test if the headers have been sent, the best way to do that
is:
if ($r->headers_out->get('Content-type')) {
...
}
since the only code that should ever add Content-type to the headers_out
table is ap_send_http_header(). thanks for the patch, but
$r->sent_header() is undocumented for a reason, it is part of an ugly hack
that should not exist, and will be gone in 2.0. if the headers_out test
doesn't help, we'll try to figure something else out.