You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ni...@apache.org on 2007/08/30 02:44:24 UTC

svn commit: r571002 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_http.c

Author: niq
Date: Wed Aug 29 17:44:24 2007
New Revision: 571002

URL: http://svn.apache.org/viewvc?rev=571002&view=rev
Log:
proxy_http: don't wait for response body in a HEAD
PR 41644 [Stuart Children]

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/proxy/mod_proxy_http.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=571002&r1=571001&r2=571002&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Aug 29 17:44:24 2007
@@ -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.

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c?rev=571002&r1=571001&r2=571002&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Wed Aug 29 17:44:24 2007
@@ -1592,7 +1592,8 @@
             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);
            }