httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <...@joe-lewis.com>
Subject Re: Deleting only bucket in brigade
Date Fri, 22 Jun 2012 16:28:09 GMT
On 6/22/12 9:52 AM, Jodi Bosa wrote:
> What do you do in an input filter when you need to remove the only bucket
> in the bucket brigade?
>
> The following results in the filter not being called with any of the
> subsequent bucket brigades:
>
>      apr_bucket_delete(b);
>
>
> The following hangs:
>
>      b->length = 0;
>
>
> In other words, my input filter gets called multiple times (once for each
> line (AP_MODE_READLINE)) with a new bucket brigade each time.  For one of
> these I want to delete the bucket but it is the only bucket in the brigade.
>
Can you simply create a new bucket (apr_bucket_alloc_create), insert it 
before the bucket you wish to delete, then delete the old bucket?

Joe
--
http://www.silverhawk.net/

Mime
View raw message