You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2005/01/19 12:06:00 UTC

svn commit: r125612 - /httpd/httpd/trunk/CHANGES /httpd/httpd/trunk/modules/proxy/proxy_ftp.c /httpd/httpd/trunk/modules/proxy/proxy_http.c

Author: jorton
Date: Wed Jan 19 03:05:57 2005
New Revision: 125612

URL: http://svn.apache.org/viewcvs?view=rev&rev=125612
Log:
* modules/proxy/proxy_http.c (ap_proxy_http_process_response): Handle
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

Modified:
   httpd/httpd/trunk/CHANGES
   httpd/httpd/trunk/modules/proxy/proxy_ftp.c
   httpd/httpd/trunk/modules/proxy/proxy_http.c

Modified: httpd/httpd/trunk/CHANGES
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/CHANGES?view=diff&rev=125612&p1=httpd/httpd/trunk/CHANGES&r1=125611&p2=httpd/httpd/trunk/CHANGES&r2=125612
==============================================================================
--- httpd/httpd/trunk/CHANGES	(original)
+++ httpd/httpd/trunk/CHANGES	Wed Jan 19 03:05:57 2005
@@ -2,6 +2,9 @@
 
   [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]
 

Modified: httpd/httpd/trunk/modules/proxy/proxy_ftp.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/proxy_ftp.c?view=diff&rev=125612&p1=httpd/httpd/trunk/modules/proxy/proxy_ftp.c&r1=125611&p2=httpd/httpd/trunk/modules/proxy/proxy_ftp.c&r2=125612
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_ftp.c	(original)
+++ httpd/httpd/trunk/modules/proxy/proxy_ftp.c	Wed Jan 19 03:05:57 2005
@@ -1821,7 +1821,8 @@
             }
 
             /* 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;
             }

Modified: httpd/httpd/trunk/modules/proxy/proxy_http.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/proxy_http.c?view=diff&rev=125612&p1=httpd/httpd/trunk/modules/proxy/proxy_http.c&r1=125611&p2=httpd/httpd/trunk/modules/proxy/proxy_http.c&r2=125612
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_http.c	(original)
+++ httpd/httpd/trunk/modules/proxy/proxy_http.c	Wed Jan 19 03:05:57 2005
@@ -928,7 +928,8 @@
                         /* 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 @@
                     }
 
                     /* 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;