From: Ruediger Pluem Date: Tue, 26 Jan 2016 11:59:07 +0000 (+0000) Subject: * For creating new buckets always use the bucket allocator of the brigade in X-Git-Tag: 2.5.0-alpha~2278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19fd02fdeb4269b39f233f93c6c08efc18fba501;p=thirdparty%2Fapache%2Fhttpd.git * For creating new buckets always use the bucket allocator of the brigade in which we want to put the bucket. Currently this does not change behaviour as r->connection->bucket_alloc and to->bucket_alloc are the same. It is a cleanup and preparation for abstracting this in a proxy API. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726776 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 9f3bdc710f0..52b444e69bf 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -692,6 +692,7 @@ static apr_status_t proxy_buckets_lifetime_transform(request_rec *r, const char *data; apr_size_t bytes; apr_status_t rv = APR_SUCCESS; + apr_bucket_alloc_t *bucket_alloc = to->bucket_alloc; apr_brigade_cleanup(to); for (e = APR_BRIGADE_FIRST(from); @@ -699,15 +700,15 @@ static apr_status_t proxy_buckets_lifetime_transform(request_rec *r, e = APR_BUCKET_NEXT(e)) { if (!APR_BUCKET_IS_METADATA(e)) { apr_bucket_read(e, &data, &bytes, APR_BLOCK_READ); - new = apr_bucket_transient_create(data, bytes, r->connection->bucket_alloc); + new = apr_bucket_transient_create(data, bytes, bucket_alloc); APR_BRIGADE_INSERT_TAIL(to, new); } else if (APR_BUCKET_IS_FLUSH(e)) { - new = apr_bucket_flush_create(r->connection->bucket_alloc); + new = apr_bucket_flush_create(bucket_alloc); APR_BRIGADE_INSERT_TAIL(to, new); } else if (APR_BUCKET_IS_EOS(e)) { - new = apr_bucket_eos_create(r->connection->bucket_alloc); + new = apr_bucket_eos_create(bucket_alloc); APR_BRIGADE_INSERT_TAIL(to, new); } else {