From: Graham Leggett Date: Tue, 6 Oct 2015 22:38:28 +0000 (+0000) Subject: Make sure that transient buckets are morphed into real buckets before X-Git-Tag: 2.5.0-alpha~2747 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d3a3704a2aa856691ff4e522f30640611dbbdcc;p=apache Make sure that transient buckets are morphed into real buckets before the filter returns. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1707163 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util_filter.c b/server/util_filter.c index 949d13e0a8..3a18169a52 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -736,6 +736,16 @@ AP_DECLARE(apr_status_t) ap_filter_setaside_brigade(ap_filter_t *f, /* decide what pool we setaside to, request pool or deferred pool? */ if (f->r) { + apr_bucket *e; + for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = + APR_BUCKET_NEXT(e)) { + if (APR_BUCKET_IS_TRANSIENT(e)) { + int rv = apr_bucket_setaside(e, f->r->pool); + if (rv != APR_SUCCESS) { + return rv; + } + } + } pool = f->r->pool; APR_BRIGADE_CONCAT(f->bb, bb); }