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 18:43:24 GMT
On 06/22/2012 12:17 PM, Jodi Bosa wrote:
> excellent - that worked!
>
>      ...
>      tmpBucket = APR_BUCKET_NEXT(b);
>      newBucket = apr_bucket_immortal_create("", (apr_size_t )0, bucketAlloc);
>      APR_BUCKET_INSERT_BEFORE(tmpBucket, newBucket);
>      apr_bucket_delete(b);
>      ...
>
>
> But I'm surprised I haven't seen this in other modules - am I that unique
> in deleting an entire bucket??

You're not the only one who removes buckets.  I delete buckets in one of 
my output filters.  If you need the filters to still be called with an 
empty brigade, the create/insert/delete technique should guarante it's 
not an empty brigade, even though there is no data.

My thoughts are that if a brigade is empty, why pass it on?  You can't 
really parse much data when there is none to be parsed.  Hence, I think 
they get dropped if the brigade is empty by default, but am not 100% 
sure on that.

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

Mime
View raw message