From: Graham Leggett Date: Tue, 24 Apr 2001 08:38:43 +0000 (+0000) Subject: Stopped the HTTP proxy from trying to read entity bodies when there X-Git-Tag: 2.0.18~168 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba986d2e6bd8f27920559f34be4aeb8eeeacae5b;p=apache Stopped the HTTP proxy from trying to read entity bodies when there wasn't one (response was 1xx, 204, 205 or 304). PR: Obtained from: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88928 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index 988133f8b3..f6d3213a28 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -741,8 +741,13 @@ PROXY_DECLARE (int) ap_proxy_http_handler(request_rec *r, proxy_server_conf *con APR_BRIGADE_INSERT_TAIL(bb, e); } - /* send body */ - if (!r->header_only) { + /* send body - but only if a body is expected */ + if ((!r->header_only) && /* not HEAD request */ + (r->status > 199) && /* not any 1xx response */ + (r->status != HTTP_NO_CONTENT) && /* not 204 */ + (r->status != HTTP_RESET_CONTENT) && /* not 205 */ + (r->status != HTTP_NOT_MODIFIED)) { /* not 304 */ + const char *buf; apr_size_t readbytes;