From: Justin Erenkrantz Date: Wed, 7 Dec 2005 00:18:58 +0000 (+0000) Subject: If we get an error reading the upstream response, we should bail. X-Git-Tag: 2.3.0~2686 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5311a38fcf156be9a8db1a944d55af4d15c49500;p=apache If we get an error reading the upstream response, we should bail. Reported by: Brian Akins git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@354628 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index d1291637a3..7d1ae03a8b 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.3.0 [Remove entries to the current 2.0 and 2.2 section below, when backported] + *) mod_proxy: If we get an error reading the upstream response, + close the connection. [Brian Akins, Justin Erenkrantz] + *) mod_ssl: Fix a possible crash during access control checks if a non-SSL request is processed for an SSL vhost (such as the "HTTP request received on SSL port" error message when an 400 diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 8333321780..1be92b8365 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1482,6 +1482,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, else if (rv != APR_SUCCESS) { ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, "proxy: error reading response"); + c->aborted = 1; break; } /* next time try a non-blocking read */ @@ -1547,6 +1548,11 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, } } while (interim_response); + /* If we our connection with the client is to be aborted, return DONE. */ + if (c->aborted) { + return DONE; + } + if (conf->error_override) { /* the code above this checks for 'OK' which is what the hook expects */ if (ap_is_HTTP_SUCCESS(r->status))