[dev] possible "bug" in ngx_http_read_discarded_body_handler
is at rambler-co.ru
Wed Oct 3 21:35:51 MSD 2007
On Wed, Oct 03, 2007 at 05:52:00PM +0200, Manlio Perillo wrote:
> Igor Sysoev ha scritto:
> >>I have read the ngx_http_finalize_request source and it handles the
> >>NGX_AGAIN status code.
> >If request was finished with NGX_AGAIN and there is buffered data in
> >filters, then nginx set ngx_http_writer() that pumps this data to client.
> Ok, thanks.
> Now it is more clear how Nginx handles buffered data.
> There is only one thing to understand: how the flush attribute of the
> buffer object works and when there is a need to flush the buffer.
Filters may buffer data, e.g. while gzipping and postpone_output.
Flush allows to flush them and to send them to client.
> >>Its very hard to follow the entire code flow of Nginx!
> >It is even more complex if you look subreqeust processing.
> What is the use case for a subrequest, and how it works?
Subrequests are used, for example, in SSI includes.
It's complex thing: nginx may run several subrequests those get data
from remote sites in parallel. The subrequests may be recursive.
More information about the nginx