...It'd be very helpful if Apache provided methods to query various in and out stream processing events to make filters more efficient. The events I can think at the moment are:
- end of HTTP input headers
I'm not sure that this is helpful because input filters aren't supposed to know about the input headers. The headers are read before the HTTP input filters are 'installed' at the end of ap_read_request (i.e. no request-level input filters are installed until *after* the headers are read - which, of course, makes sense).
- end of HTTP input body
An EOS *is* generated for this.
- end of HTTP response headers
As soon as the first write is sent, it should be assumed that the headers are written. That is, if you want to change the headers and you are an output filter, you *must* change it on the first write you intercept.
- end of HTTP response body
An EOS is sent for this.
Ideally the connection record could have the following entries:
done_with_input_headers done_with_input_body done_with_output_headers done_with_output_body
As nd pointed out, this is completely invalid as that'd mean that the connections now know about the underlying protocol and that violates our abstraction.
The impression I got from this email is that you want connection-level filters to know about HTTP, and I'm not sure I agree with that. If a connection-level filter "needs" to know HTTP, I don't think it should be a connection-level filter. -- justin
