Commit 85461d2c authored by Joe Orton's avatar Joe Orton
Browse files

* 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@125612 13f79535-47bb-0310-9956-ffa450edef68
parent 6e06e95c
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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 Hietamki, Joe Orton]
  *) mod_cache: Remove unimplemented CacheForceCompletion directive.
     [Justin Erenkrantz]
+2 −1
Changes for modules/proxy/proxy_ftp.c: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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;
            }
+4 −2
Changes for modules/proxy/proxy_http.c: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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;