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

I know it was ages ago when you sent this patch, but what's the
rationale for having $r->sent_header() return 1 when it hasn't sent the
header?  Shouldn't it be fixed to return 1 or 0 according to whether the
header has actually been sent?  

If need be, perhaps it could distinguish like this:

   undef - headers have not been sent (PerlSendHeader on)
       0 - headers have not been sent (PerlSendHeader off)
       1 - headers have already been sent (PerlSendHeader off)
       2 - headers have already been sent (PerlSendHeader on)

But I'd rather just have it return 1 or 0, and have a seperate method
that tells you whether PerlSendHeader is on or off.



Reply via email to