[ANNOUNCE] ngx_echo v0.29: major core refactoring and more robust sequential subrequests
agentzh
agentzh at gmail.com
Tue May 11 07:09:21 MSD 2010
On Tue, May 11, 2010 at 4:12 AM, peterjanovsky <nginx-forum at nginx.us> wrote:
> can't wait to get into the source. i've been snooping around the echo
> module source to familiarize myself with subrequests as it provides great
> examples.
Yay!
> question, is it possible to determine a content-length when you utilize
> subrequests or will that prohibit chunking?
Yes, it's possible :)
you can inspect all your subrequest's response bufs in your own output
filter and accumulate the overall buf size (i.e., the total length of
your subrequest's response) along the way (but not buffer the bufs
themselves).
It will not prohibit chunking as long as you don't want to send a
Content-Length header before sending the response bufs.
Cheers,
-agentzh
More information about the nginx
mailing list