httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: [apache-2.1.3] buffering content in input filter
Date Wed, 12 Jan 2005 16:43:22 GMT
Pawel Niewiadomski wrote:
> hello,
> I'm writing an input filter that needs to operate on a full content
> of incoming request. But it should not pass incoming data to other
> input filters - it gathers full body of request, changes it and then
> passes it further.
> I have one problem - if I empty a brigade that is passed to the input filter
> it is not called again.
> I read that free brigades mean that input is ended. If I leave a byte in the
> brigade everything works ok - input filter is called until
> EOS and I can dump previously gathered content. But I don't want to
> add these bytes. 
> Does anyone know how can I solve this problem?

Instead of returning empty brigades up the stream, you can gobble up all 
incoming data by issuing your own ap_get_brigade calls. I don't have 
example in C, but you can see how it's done in perl:

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message