From 4d3a3704a2aa856691ff4e522f30640611dbbdcc Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Tue, 6 Oct 2015 22:38:28 +0000 Subject: [PATCH] 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 --- server/util_filter.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); }