httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Fosdick <b...@bfoz.net>
Subject Re: Buckets and brigades
Date Sat, 22 Apr 2006 19:46:11 GMT
Nick Kew wrote:
> http://www.apachetutor.org/dev/brigades

Thanks. What book are you referring to?

>>         apr_bucket_brigade *bb;
>>         bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
>>         rc = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES,
>>                                 APR_BLOCK_READ, DAV_READ_BLOCKSIZE);
> 
> That's standard for the input chain.  ap_get_brigade just populates
> the brigade that was just created.

ah, it creates an empty brigade and then fills it with the request body...that makes more
sense.
By "populate", do you mean that it's making a copy of the bits?

I found ap_get_brigade in util_filter.h, and it says that it gets "the current bucket brigade
from the next filter on the filter stack". Intuitively (for me), "next filter" refers to a
filter that has yet to be called, so how does it already have the brigade when the "current
filter" doesn't? And then, right below that, is ap_pass_brigade, which passes the brigade
to the "next filter". I don't see anything about previous filters. Am I looking at typos or
am I missing something?

Mime
View raw message