Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 31059 invoked by uid 500); 24 Apr 2001 08:38:49 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 30474 invoked by uid 500); 24 Apr 2001 08:38:45 -0000 Delivered-To: apmail-httpd-proxy-cvs@apache.org Date: 24 Apr 2001 08:38:44 -0000 Message-ID: <20010424083844.30338.qmail@apache.org> From: minfrin@apache.org To: httpd-proxy-cvs@apache.org Subject: cvs commit: httpd-proxy/module-2.0 proxy_http.c minfrin 01/04/24 01:38:44 Modified: . CHANGES module-2.0 proxy_http.c Log: Stopped the HTTP proxy from trying to read entity bodies when there wasn't one (response was 1xx, 204, 205 or 304). Revision Changes Path 1.28 +4 -0 httpd-proxy/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/httpd-proxy/CHANGES,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- CHANGES 2001/04/19 21:18:39 1.27 +++ CHANGES 2001/04/24 08:38:41 1.28 @@ -1,6 +1,10 @@ mod_proxy changes for 2.0.15 current + *) Stopped the HTTP proxy from trying to read entity bodies when there + wasn't one (response was 1xx, 204, 205 or 304). + [Graham Leggett ] + *) Made sure dates were canonicalised correctly when passed to the client browser through the HTTP proxy. [Graham Leggett ] 1.66 +7 -2 httpd-proxy/module-2.0/proxy_http.c Index: proxy_http.c =================================================================== RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_http.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- proxy_http.c 2001/04/24 04:38:52 1.65 +++ proxy_http.c 2001/04/24 08:38:43 1.66 @@ -741,8 +741,13 @@ 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;