Subrequests from body filters

Maxim Dounin mdounin at mdounin.ru
Mon Mar 25 13:47:12 UTC 2013


Hello!

On Mon, Mar 25, 2013 at 05:40:37PM +0400, Marat Dakota wrote:

> Hi,
> 
> Thanks for this correction.
> 
> But is it ok to call next body filter in subrequest's body filter to
> produce output to main request?
> I mean ngx_http_next_body_filter(r->main, out).

No.  You should call next body filter of the request you are 
working with.  It's postpone filter responsibility to manage 
subrequests output, and if you try to do this yourself instead - 
result will be undefined.

-- 
Maxim Dounin
http://nginx.org/en/donation.html



More information about the nginx-devel mailing list