httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <>
Subject Re: [RFC] Guide to writing output filters
Date Fri, 23 Mar 2007 13:02:06 GMT
On Mon, Mar 19, 2007 at 10:15:03PM +0100, Ruediger Pluem wrote:
[on passing empty brigades and mod_cache]
> Once we detect that we have a fresh content entity in the cache, the 
> quick handler of mod_cache starts the filter chain by calling
> ap_pass_brigade(r->output_filters, out);
> where out is an empty brigade created by the quick handler. The brigade gets filled
> with the cached content by the CACHE_OUT filter down in the chain.

I think that was simply abuse of the filter interface, and fixing 
mod_cache was correct.  If a filter was passed a non-empty brigade, it 
may legitimately buffer the contents of that brigade without passing it 
on down the chain.  So to then require explicitly that an *empty* 
brigade *must* be passed down makes little sense IMO.

> >>- Procesing buckets: I think with mmap enabled a file bucket will morph into
> >>  a mmap bucket and the remaining file bucket. I think the heap bucket will
> >>  only be created if mmap is turned off. But I agree that this  possibly introduces
> >>  too much complexity to the example and distracts the reader from the important
> >>  point.
> > Yeah.  It's an implementation detail, and the risk is that if it gets 
> > documented, people will rely on it somehow.
> Why can't you rely on this? Isn't that the publicly defined behaviour 
> of a file bucket when MMAP is enabled?

Simply that there's nothing in the definition of a FILE bucket which 
states it will always morph into MMAP under conditions X, Y, Z.


View raw message