httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: making filters more efficient
Date Tue, 02 Mar 2004 17:30:05 GMT
--On Monday, March 1, 2004 10:58 PM -0800 Stas Bekman <stas@stason.org> wrote:

>> An EOS *is* generated for this.
>
> It does in the request filter (in and out).
>
> It does in the connection output filter.
>
> It does *not* in the connection input filter.

Correct.  Because the EOS is generated by the request-level protocol handler 
(HTTP_IN).  That's exactly how it is designed.  If a connection input filter 
saw EOS, it'd signal end-of-connection not end-of-request.  But, we don't even 
have EOC yet - Madhu's adding it for mod_ssl's purposes for the output chain.

> Yes, this is how it works. There is no API to tell you that. e.g. what if
> you want to check from the response handler whether Apache has already sent
> the headers or not? In 1.3 the user controlled that, but that's not the case
> in 2.0. The moment something sends the output the headers are flushed. that
> something at times could be an empty bucket when an uninitented flush
> triggers data out.

There's been no data written by the time the response handler is called.  So, 
the handler can always set the headers before it does the first write.  Once a 
write is triggered, you must assume that the headers are sent.  And, that's 
(almost) how it was in 1.3 as well.  -- justin


Mime
View raw message