Changes with Apache 2.1.0-dev
[Remove entries to the current 2.0 section below, when backported]
+ *) proxy_http fix: mod_proxy hangs when both KeepAlive and
+ ProxyErrorOverride are enabled, and a non-200 response without a
+ body is generated by the backend server. (e.g.: a client makes a
+ request containing the "If-Modified-Since" and "If-None-Match"
+ headers, to which the backend server respond with status 304.)
+ [Graham Wiseman <gwiseman fscinternet.com>, Richard Reiner]
*) mod_ssl: Add support for distributed session cache using 'distcache'.
[Geoff Thorpe <geoff geoffthorpe.net>]
*/
int status = r->status;
r->status = HTTP_OK;
- ap_discard_request_body(rp);
+ /* Discard body, if one is expected */
+ if ((status > 199) && /* not any 1xx response */
+ (status != HTTP_NO_CONTENT) && /* not 204 */
+ (status != HTTP_RESET_CONTENT) && /* not 205 */
+ (status != HTTP_NOT_MODIFIED)) { /* not 304 */
+ ap_discard_request_body(rp);
+ }
return status;
}
} else