1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

* Rip out the old flushing approach for solving lifetime issues between the

backend connection bucket allocator and front end connection bucket allocator.
  Instead copy the buckets from the backend over to ones that have been created
  using the front end bucket allocator. For metabucket this is done by recreating
  them, for data buckets this is done by reading them and putting the read data
  in a transient bucket.

PR: 45792


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@712375 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ruediger Pluem
2008-11-08 11:09:38 +00:00
parent 0d1be6231d
commit 4a3c945b14
5 changed files with 85 additions and 120 deletions

View File

@@ -1335,6 +1335,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
request_rec *rp;
apr_bucket *e;
apr_bucket_brigade *bb, *tmp_bb;
apr_bucket_brigade *pass_bb;
int len, backasswards;
int interim_response = 0; /* non-zero whilst interim 1xx responses
* are being read. */
@@ -1347,6 +1348,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
const char *te = NULL;
bb = apr_brigade_create(p, c->bucket_alloc);
pass_bb = apr_brigade_create(p, c->bucket_alloc);
/* Get response from the remote server, and pass it up the
* filter chain
@@ -1765,6 +1767,9 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
break;
}
/* Switch the allocator lifetime of the buckets */
ap_proxy_buckets_lifetime_transform(r, bb, pass_bb);
/* found the last brigade? */
if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
/* signal that we must leave */
@@ -1772,7 +1777,7 @@ 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, pass_bb) != APR_SUCCESS
|| c->aborted) {
/* Ack! Phbtt! Die! User aborted! */
backend->close = 1; /* this causes socket close below */
@@ -1781,6 +1786,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
/* make sure we always clean up after ourselves */
apr_brigade_cleanup(bb);
apr_brigade_cleanup(pass_bb);
} while (!finish);
}