]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* proxy_http fix: mod_proxy hangs when both KeepAlive and
authorPaul J. Reder <rederpj@apache.org>
Fri, 30 Jan 2004 15:52:09 +0000 (15:52 +0000)
committerPaul J. Reder <rederpj@apache.org>
Fri, 30 Jan 2004 15:52:09 +0000 (15:52 +0000)
  ProxyErrorOverride are enabled, and a non-200 response without a
  body is generated by the backend server.

Submitted by: Graham Wiseman <gwiseman fscinternet.com>, Richard Reiner
Reviewed by: stoddard, nd, jerenkrantz, rederpj

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

CHANGES
STATUS
modules/proxy/proxy_http.c

diff --git a/CHANGES b/CHANGES
index b172674ed24b151e0d941ce6d9613563d02b69a1..012d44e2662c131ecddb4ed890a35ba394e4fc34 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,12 @@
 Changes with Apache 2.0.49
 
+  *) 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_dav: Reject requests which include an unescaped fragment in the
      Request-URI.  PR 21779.  [Amit Athavale <amit_athavale lycos.com>]
 
diff --git a/STATUS b/STATUS
index a3d7d848803c3f8eec3bc7203f1a2cfb77f700a8..88bbf62f6c92504a52ae486a76fcd78411a6ec42 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2004/01/30 13:26:23 $]
+Last modified at [$Date: 2004/01/30 15:52:07 $]
 
 Release:
 
@@ -86,12 +86,6 @@ PATCHES TO BACKPORT FROM 2.1
       jerenkrantz: Why is rm not application/vnd.rn-realmedia as in PR 26079?
       +1: nd, trawick
 
-    * 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.
-      http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/proxy/proxy_http.c?r1=1.176&r2=1.177 
-      +1: stoddard, nd, jerenkrantz
-
     * If large file support is enabled, allow any file that is greater than
       AP_MAX_SENDFILE to be split into multiple buckets. This allows Apache
       to send files that are greater than 2gig. Otherwise we run into 
index 7256d99c5f208e87592b714320ca408e45dc773f..228569581e07e3d155e1d3278c38b559b268585b 100644 (file)
@@ -995,7 +995,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