On Wed, Oct 7, 2015 at 12:38 AM,  <[email protected]> wrote:
> Author: minfrin
> Date: Tue Oct  6 22:38:28 2015
> New Revision: 1707163
>
> URL: http://svn.apache.org/viewvc?rev=1707163&view=rev
> Log:
> Make sure that transient buckets are morphed into real buckets before
> the filter returns.
>
> Modified:
>     httpd/httpd/trunk/server/util_filter.c
>
> Modified: httpd/httpd/trunk/server/util_filter.c
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_filter.c?rev=1707163&r1=1707162&r2=1707163&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/util_filter.c (original)
> +++ httpd/httpd/trunk/server/util_filter.c Tue Oct  6 22:38:28 2015
> @@ -736,6 +736,16 @@ AP_DECLARE(apr_status_t) ap_filter_setas
>
>          /* 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);
>          }

I don't understand this, why using ap_save_brigade() for both cases
(i.e. setting aside or reading the other types of buckets) would lead
to synchronous behaviour?
It is when r->pool gets destroyed?
If so, how is it different from the buckets currently set aside on r->pool?

We could also possibly always use the deferred_pool (moving it to
conn_rec if we don't want one per reinstate-able filter).

Regards,
Yann.

Reply via email to