On Tue, Jun 1, 2010 at 11:02 AM, "Plüm, Rüdiger, VF-Group" <ruediger.pl...@vodafone.com> wrote: >> The guide to writing output filters says: >> >> https://httpd.apache.org/docs/trunk/developer/output-filters.h >> tml#invocation >> >> "An output filter should never pass an empty brigade down the filter >> chain. But, for good defensive programming, filters should be prepared >> to accept an empty brigade, and do nothing." > > IMHO do nothing means the same thing as pass it down the chain. So I think > mod_deflate does the correct thing here.
On the contrary, the link above specifically recommends putting the following code snippet at the top of your output filter to suppress the empty brigade (rather than pass it along to the next filter): apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb) { if (APR_BRIGADE_EMPTY(bb)) { return APR_SUCCESS; } .... Does anyone know whether or not this is the right thing to do? Cheers, -Matt