]> granicus.if.org Git - apache/commitdiff
proxy_http: don't wait for response body in a HEAD
authorNick Kew <niq@apache.org>
Thu, 30 Aug 2007 00:44:24 +0000 (00:44 +0000)
committerNick Kew <niq@apache.org>
Thu, 30 Aug 2007 00:44:24 +0000 (00:44 +0000)
PR 41644 [Stuart Children]

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

CHANGES
modules/proxy/mod_proxy_http.c

diff --git a/CHANGES b/CHANGES
index 75528e6feeeddddb2bfe0aeda929c494b91f0dee..43b5934364b78e9273ccccaa3f9417c48af18592 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.3.0
 
+  *) mod_proxy_http: Don't try to read body of a HEAD request before
+     responding.
+     PR 41644 [Stuart Children <stuart terminus.co.uk>]
+
   *) mod_autoindex: Add in Type and Charset options to
      IndexOptions directive. This allows the admin to explicitly
      set the content-type and charset of the generated page.
index 8e45d8e845ec1dd75684b24904fdcf14c510a55a..ba3cb70e321bdb6e8973541dafc19d730c281a7d 100644 (file)
@@ -1592,7 +1592,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);
            }