60186Re: mod_perl2, HEAD request and Content-Length
- Aug 4, 2004Glenn Strauss wrote:
> On Mon, Aug 02, 2004 at 11:55:56AM -0700, Stas Bekman wrote:Thanks Glenn, calling $r->rflush works perfectly fine to cause
> I mentioned to Geoff off-list about possibly using a flush bucket,
> since I don't have a test setup ready (just replaced my dead
> laptop hard drive)
user-preset C-L header to be delivered to the client on HEAD request.
> I wrote:I think this is not the reason why ap_send_http_header was removed from
>>>I used to make good use of $r->send_http_header() in my MP1 handlers.
>>>This method isn't available in MP2 (why?), though I could picture it
>>>replaced by sending a flush bucket down the filter chain.
> On Tue, Aug 03, 2004 at 10:04:38AM -0400, Geoffrey Young wrote:
>>apache now sends the headers for you via the header filter. if you were
>>allowed to send your own headers you might send them before a filter ran
>>that would alter the headers. for instance, mod_include removes the ETag
Apache2 API. It's simply not needed because the headers_out filter will
inject the headers as soon as some body is sent. Your example of
mod_include doesn't work if the response handler does:
$r->rflush; # or if the previous print was big enough to cause flush
$r->print(q[<!--#include virtual="/foo" -->]);
> Would a flush bucket be a great way to say "send headers now"?It does.
> So if you're not going to send the actual content down the filter chain
> on a HEAD request, would sending a flush bucket make things happy?
> IIF this works, can I make a request the $r->send_http_header() beAbsolutely. But it'd be nice if you could first ask the httpd-dev list:
> implemented in Apache2 to do just that? (create and pass a flush bucket)
if they are interested in adding the C API to do that.
If httpd-dev doesn't do it, I suppose we can still implement it in mp2.
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@... http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
- << Previous post in topic Next post in topic >>