httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Re: How to filter headers
Date Thu, 24 Aug 2000 15:58:50 GMT
rbb@covalent.net wrote:
> 
> 3) ap_pass_brigade converts the headers to a bucket (again either
>    header or heap type), and that is passed down the filter stack.
>    Filters make their own decisions based on the header bucket

No, I don't think ap_pass_brigade should do it.  I think the core
should do it during the content handling, immediately after the
actual content handler and right before calling the first filter.
It creates a new bucket of type 'header', copies r->headers_out and
r->err_headers_out into it, and inserts it at the head of the brigade.

The first bucket a filter releases *must* be the header bucket,
and once it has released it the filter cannot munge the header
fields any more.  So things like the hypothetical gzip filter
can hang onto the header bucket and twiddle it as the rest of the
data comes in, and release it whenever.  (For a very large
document, the filter might decide to forego being able to set
the Content-length, and just start sending the header and the
data processed to the point of decision.)

BTW, can we please stop referring to these as 'headers'?  The
request and response each have a header; the contents of those
are header *fields*.
-- 
#ken    P-)}

Ken Coar                    <http://Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed"   <http://ApacheUnleashed.Com/>

Mime
View raw message