From: Nick Kew Date: Thu, 30 Aug 2007 00:44:24 +0000 (+0000) Subject: proxy_http: don't wait for response body in a HEAD X-Git-Tag: 2.3.0~1510 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c004da02315cff185e66066bc9016a31f1b64f7d;p=apache proxy_http: don't wait for response body in a HEAD PR 41644 [Stuart Children] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@571002 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 75528e6fee..43b5934364 100644 --- 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 ] + *) 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. diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 8e45d8e845..ba3cb70e32 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -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); }