This bug occurs in mod_proxy when both KeepAlive and ProxyErrorOverride are enabled, and non-200 response without a body is generated by the backend server. e.g.: a request containing the "If-Modified-Since" and "If-None-Match" headers, which the backend server responds to with status 304.
Conditions: - mod_proxy acting as a forward or reverse proxy - KeepAlive On - ProxyErrorOverride On - Persistent connection to backend server - backend server responds with a non-200 status - backend server does not send a body Details: In proxy_http.c, ap_discard_request_body() is called on a request with a non-200 status when ProxyErrorOverride is enabled. ap_discard_request_body() eventually calls ap_http_filter() which, when called with a proxy response request_rec, attempts to read a body even when there is no indication that one exists (response bodies can be terminated with a connection close, instead of using a CL header or chunked encoding). However, on a persistent connection to the backend, the read blocks until a timeout occurs (apr_wait_for_io_or_timeout()). The attached patch works around this problem by not calling ap_discard_request_body() on responses that never have a response body (1xx, 204, 205, 304). Graham Wiseman [EMAIL PROTECTED]
patch-proxy_http.diff
Description: Binary data
