]> granicus.if.org Git - apache/commitdiff
If we get an error reading the upstream response, we should bail.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 7 Dec 2005 00:18:58 +0000 (00:18 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 7 Dec 2005 00:18:58 +0000 (00:18 +0000)
Reported by: Brian Akins

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

CHANGES
modules/proxy/mod_proxy_http.c

diff --git a/CHANGES b/CHANGES
index d1291637a37fc3175310e705079d9eebbadb5feb..7d1ae03a8bcc195762aeaf627fde1de5d51cfa8c 100644 (file)
--- 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 
index 83333217806b0a2c6f737b92e2bc737020333853..1be92b83658a64641b054ce571571aa0fe5de140 100644 (file)
@@ -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))