httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject Re: calling ap_get_brigade with nonempty brigade
Date Mon, 09 Jun 2003 05:14:01 GMT
Stas Bekman <> writes:

> Joe Schaefer wrote:
> > ap_http_filter seems to assume it will receive an empty brigade from its
> > caller. 


> I think that assumptions is valid for all filters and is correct by (an
> undocumented) design.

I sure hope it's not by design, because an unsuspecting content-handler
author who violates the (undocumented) assumption can segfault the
server quite by accident.  But if it is by design, *why* isn't there 
at least an assert(APR_BRIGADE_IS_EMPTY...) *anywhere* within the
httpd-2.0 source tree?

> If I understand things correctly, If you want to re-use some older bbs
> (e.g. from previous invocations or if you have an underrun and ask for
> more during the same invocation), you should create a new bb, pass it
> to ap_get_brigade() and then merge with the previous one.

Right, that's the situation.

Joe Schaefer

View raw message