From 4bc7f40b18c73b40418d1df5ed4a975eafd260b8 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 1 Nov 2004 23:04:05 +0000 Subject: [PATCH] * server/util_filter.c (ap_save_brigade): Be more tolerant of a bucket type which neither implements ->setaside nor morphs on ->read, such as the mod_perl SV bucket type in mod_perl <1.99_17; defer returning an error in this case until after calling setaside on each bucket. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105664 13f79535-47bb-0310-9956-ffa450edef68 --- server/util_filter.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/server/util_filter.c b/server/util_filter.c index a294248248..b6fc91912e 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -532,7 +532,7 @@ AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f, apr_bucket_brigade **b, apr_pool_t *p) { apr_bucket *e; - apr_status_t rv; + apr_status_t rv, srv = APR_SUCCESS; /* If have never stored any data in the filter, then we had better * create an empty bucket brigade so that we can concat. @@ -561,11 +561,16 @@ AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f, } if (rv != APR_SUCCESS) { - return rv; + srv = rv; + /* Return an error but still save the brigade if + * ->setaside() is really not implemented. */ + if (rv != APR_ENOTIMPL) { + return rv; + } } } APR_BRIGADE_CONCAT(*saveto, *b); - return APR_SUCCESS; + return srv; } AP_DECLARE_NONSTD(apr_status_t) ap_filter_flush(apr_bucket_brigade *bb, -- 2.40.0