]> granicus.if.org Git - apache/commitdiff
mod_proxy hangs when both KeepAlive and ProxyErrorOverride are enabled,
authorBill Stoddard <stoddard@apache.org>
Fri, 9 Jan 2004 03:04:41 +0000 (03:04 +0000)
committerBill Stoddard <stoddard@apache.org>
Fri, 9 Jan 2004 03:04:41 +0000 (03:04 +0000)
and a non-200 response without a body is generated by the backend
server.

Submitted by: Graham Wiseman, Richard Reiner
Reviewed by: Richard Reiner, Bill Stoddard

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102239 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/proxy_http.c

diff --git a/CHANGES b/CHANGES
index f168fea94585ff1d7f71ed4e4bf4753335960fd2..6e98e6e74543e4ea84ece49f154689d28abf7dac 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,12 @@
 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>]
index 03a563bf271aa1790a1c81a64cce23ae78b0248e..0dbcd11de540c8b0ab51471ef85e4c78f5c2bd26 100644 (file)
@@ -1091,7 +1091,13 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
              */
             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