mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
* Do not fiddle around with the close field if we might have returned the
connection to the pool already. It might be already in use again by another thread. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1052224 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1946,7 +1946,9 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
|
|||||||
if (ap_pass_brigade(r->output_filters, pass_bb) != APR_SUCCESS
|
if (ap_pass_brigade(r->output_filters, pass_bb) != APR_SUCCESS
|
||||||
|| c->aborted) {
|
|| c->aborted) {
|
||||||
/* Ack! Phbtt! Die! User aborted! */
|
/* Ack! Phbtt! Die! User aborted! */
|
||||||
backend->close = 1; /* this causes socket close below */
|
if (!backend->cleaned) {
|
||||||
|
backend->close = 1; /* this causes socket close below */
|
||||||
|
}
|
||||||
finish = TRUE;
|
finish = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1974,11 +1976,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
|
|||||||
/* Pass EOS bucket down the filter chain. */
|
/* Pass EOS bucket down the filter chain. */
|
||||||
e = apr_bucket_eos_create(c->bucket_alloc);
|
e = apr_bucket_eos_create(c->bucket_alloc);
|
||||||
APR_BRIGADE_INSERT_TAIL(bb, e);
|
APR_BRIGADE_INSERT_TAIL(bb, e);
|
||||||
if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS
|
ap_pass_brigade(r->output_filters, bb);
|
||||||
|| c->aborted) {
|
|
||||||
/* Ack! Phbtt! Die! User aborted! */
|
|
||||||
backend->close = 1; /* this causes socket close below */
|
|
||||||
}
|
|
||||||
|
|
||||||
apr_brigade_cleanup(bb);
|
apr_brigade_cleanup(bb);
|
||||||
}
|
}
|
||||||
@@ -2162,7 +2160,7 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
|
|||||||
/* Step Six: Clean Up */
|
/* Step Six: Clean Up */
|
||||||
cleanup:
|
cleanup:
|
||||||
if (backend) {
|
if (backend) {
|
||||||
if (status != OK)
|
if ((status != OK) && (!backend->cleaned))
|
||||||
backend->close = 1;
|
backend->close = 1;
|
||||||
ap_proxy_http_cleanup(proxy_function, r, backend);
|
ap_proxy_http_cleanup(proxy_function, r, backend);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user