Commit 41f699e1 authored by Joe Orton's avatar Joe Orton
Browse files

* 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
parent 2baf3b44
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -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) {
            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,