From ba986d2e6bd8f27920559f34be4aeb8eeeacae5b Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Tue, 24 Apr 2001 08:38:43 +0000 Subject: [PATCH] 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 --- modules/proxy/proxy_http.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; -- 2.50.1