httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <>
Subject [PATCH] ap_http_filter rewrite round 2
Date Mon, 03 Mar 2003 19:28:40 GMT
This incorporates some (but not all) of Justin's suggestions.  This 
patch will handle request bodies (both c-l and chunk encoded). Not 
tested with pipelined requests but I think it will work.

Recap... ap_http_filter is now responsible for parsing the http protocol 
header fields.  This patch gets its performance improvement by replacing 
multiple calls to ap_get_brigade(AP_MODE_GETLINE) made in 
read_request_line and ap_get_mime_headers with a single call to 
ap_get_brigade(AP_MODE_READBYTES) made from ap_http_filter (aka 
HTTP_IN).  Because ap_get_brigade(AP_MODE_READBYTES) can fetch request 
body and/or a pipelined request bytes, the filter needs to be able to 
setaside bytes received on ap_get_brigade that do not pertain to this 
request (this is exactly what the core_input_filter does). 
ap_http_filter uses a state driven algorithm to deliniate between 
request headers, request bodies and pipelined requests.

Still to do:
- optionally refactor core_input_filter to account for ap_http_filter's 
new function
- cleanup the error paths (code uses two different ways to handle 
sending error responses to the client, which is goofy)
- handle the con_rec->r fooness a bit more cleanly
- get this patch working for proxy requests
- properly handle trailers (the code is commented out now)


View raw message