httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject How to filter headers
Date Sun, 13 Aug 2000 22:23:50 GMT

One of the questions that was never answered during the filter design
meeting, is how to deal with headers.  There are multiple options, and I
will try to outline them here.  We need to decide on this relatively soon,
because it impacts writing many filters.

1)  ap_send_http_header converts the header table to a bucket, and returns
that bucket to the calling handler.  This bucket is either a special
headers bucket, or just a text string.

Pros:  easy to write
Cons:  Current handlers need to change

2) ap_send_http_header is split into two functions.  The first makes
decisions based on the current headers.  The second writes the headers to
the network

Pros:  Current modules just work
Cons:  The header handling is a bit complex.

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

Pros:  This makes the most sense logically, and allows for the most
Cons:  I can't think of any.

Obviously I like option #3.  This is likely to not be the only options,
but they are the easy ones, and the first three I could think of.  If
there are other options, please speak up.  We also need to talk about what
the header bucket will look like.  I would personally like it to be a
table of headers much like the current request_rec headers_out are.  This
is a simple API that people already know, and it does work.  Using a text
string means that module writers need to parse the string themselves.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message