]> granicus.if.org Git - apache/commitdiff
* For creating new buckets always use the bucket allocator of the brigade in
authorRuediger Pluem <rpluem@apache.org>
Tue, 26 Jan 2016 11:59:07 +0000 (11:59 +0000)
committerRuediger Pluem <rpluem@apache.org>
Tue, 26 Jan 2016 11:59:07 +0000 (11:59 +0000)
  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

modules/proxy/mod_proxy_http.c

index 9f3bdc710f0bcc38b72a3a40a8b5fde811b1ce49..52b444e69bfa4918322f91b9b911170d26b3cb57 100644 (file)
@@ -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 {