]> granicus.if.org Git - apache/commitdiff
* modules/proxy/proxy_http.c (ap_proxy_http_process_response): Handle
authorJoe Orton <jorton@apache.org>
Wed, 19 Jan 2005 11:05:57 +0000 (11:05 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 19 Jan 2005 11:05:57 +0000 (11:05 +0000)
aborted connections correctly: abort if c->aborted is set.

* modules/proxy/proxy_ftp.c (proxy_ftp_handler): Likewise.

PR: 32443
Submitted by: Janne Hietamäki, Joe Orton

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

CHANGES
modules/proxy/proxy_ftp.c
modules/proxy/proxy_http.c

diff --git a/CHANGES b/CHANGES
index 4ed67c866079c4b34ee060bc5f1c6aa173a9ba26..679cec8a93b75c12e5c76feb5ce0196559d51a41 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.3
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) mod_proxy: Handle client-aborted connections correctly.  PR 32443.
+     [Janne Hietamäki, Joe Orton]
+
   *) mod_cache: Remove unimplemented CacheForceCompletion directive.
      [Justin Erenkrantz]
 
index aca55cc31db49934d208e9caab0c80719709b577..5dc6db2c0cc52a04a359eab32fb0a885500b46f3 100644 (file)
@@ -1821,7 +1821,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
             }
 
             /* try send what we read */
-            if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS) {
+            if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS
+                || c->aborted) {
                 /* Ack! Phbtt! Die! User aborted! */
                 finish = TRUE;
             }
index 57cfd6367dea0fb132e15d3c2fbbef948d50de67..5552403313ee8e43786721303f0241761621b4dd 100644 (file)
@@ -928,7 +928,8 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                         /* flush to the client and switch to blocking mode */
                         e = apr_bucket_flush_create(c->bucket_alloc);
                         APR_BRIGADE_INSERT_TAIL(bb, e);
-                        if (ap_pass_brigade(r->output_filters, bb)) {
+                        if (ap_pass_brigade(r->output_filters, bb) 
+                            || c->aborted) {
                             backend->close = 1;
                             break;
                         }
@@ -972,7 +973,8 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                     }
 
                     /* try send what we read */
-                    if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS) {
+                    if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS
+                        || c->aborted) {
                         /* Ack! Phbtt! Die! User aborted! */
                         backend->close = 1;  /* this causes socket close below */
                         finish = TRUE;