copied natively. This will only ever happen if a bucket can be split
but not copied, because we read the bucket in apr_brigade_partition if
we can't split it. Regardless, this is much safer. This should also fix
all of the problems with the byterange filter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87793
13f79535-47bb-0310-9956-
ffa450edef68
ec = e;
do {
apr_bucket *foo;
- apr_bucket_copy(ec, &foo);
+ const char *str;
+ apr_size_t len;
+
+ if (apr_bucket_copy(ec, &foo) != APR_SUCCESS) {
+ apr_bucket_read(ec, &str, &len, APR_BLOCK_READ);
+ foo = apr_bucket_create_heap(str, len, 0, NULL);
+ }
APR_BRIGADE_INSERT_TAIL(bsend, foo);
ec = APR_BUCKET_NEXT(ec);
} while (ec != e2);