]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r571002 from trunk:
authorJim Jagielski <jim@apache.org>
Sat, 1 Sep 2007 12:11:55 +0000 (12:11 +0000)
committerJim Jagielski <jim@apache.org>
Sat, 1 Sep 2007 12:11:55 +0000 (12:11 +0000)
proxy_http: don't wait for response body in a HEAD
PR 41644 [Stuart Children]

Submitted by: niq
Reviewed by: jim

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

CHANGES
STATUS
modules/proxy/mod_proxy_http.c

diff --git a/CHANGES b/CHANGES
index fbccb4ec364f60a51e75a31cf2ffdad45d4f0987..43010975823cfa5a43f5ad044d5826b2bfbc8c59 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.6
 
+  *) mod_proxy_http: Don't try to read body of a HEAD request before
+     responding.  PR 41644 [Stuart Children <stuart terminus.co.uk>]
+
   *) mod_authnz_ldap: Don't return HTTP_UNAUTHORIZED during authorization when
      LDAP authentication is configured but we haven't seen any 
      'Require ldap-*' directives, allowing authorization to be passed to lower 
diff --git a/STATUS b/STATUS
index 6610c783e0ffe57cd355f0c17b96771bc8e6f365..08373ba19e67f4beb6d51c0aa9c65237b203d112 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -79,11 +79,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_proxy_http: Don't wait for response body in a HEAD request
-     PR 41644
-     http://svn.apache.org/viewvc?view=rev&revision=571002
-     +1: niq, rpluem, jim
-
    * mod_proxy: Add ProxyPass status option to ignore errors
      PR 43167
      http://svn.apache.org/viewvc?view=rev&revision=571338
index c8fd8c5d8dc0ac0a6b44450b580c5140e87be7d4..47d8f91198b3399f4d8d11b845afd89c31cf9616 100644 (file)
@@ -1599,7 +1599,8 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
             int status = r->status;
             r->status = HTTP_OK;
             /* Discard body, if one is expected */
-            if ((status != HTTP_NO_CONTENT) && /* not 204 */
+            if (!r->header_only && /* not HEAD request */
+                (status != HTTP_NO_CONTENT) && /* not 204 */
                 (status != HTTP_NOT_MODIFIED)) { /* not 304 */
                ap_discard_request_body(rp);
            }