Mercurial > hg > nginx
changeset 6887:17000e3ba589 stable-1.10
Addition filter: set last_in_chain flag when clearing last_buf.
When the last_buf flag is cleared for add_after_body to append more data from a
subrequest, other filters may still have buffered data, which should be flushed
at this point. For example, the sub_filter may have a partial match buffered,
which will only be flushed after the subrequest is done, ending up with
interleaved data in output.
Setting last_in_chain instead of last_buf flushes the data and fixes the order
of output buffers.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 03 Oct 2016 21:03:27 +0300 |
parents | cd02bac58c3b |
children | 70539dd7abe5 |
files | src/http/modules/ngx_http_addition_filter_module.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_addition_filter_module.c Tue Jan 31 16:15:31 2017 +0300 +++ b/src/http/modules/ngx_http_addition_filter_module.c Mon Oct 03 21:03:27 2016 +0300 @@ -171,6 +171,7 @@ for (cl = in; cl; cl = cl->next) { if (cl->buf->last_buf) { cl->buf->last_buf = 0; + cl->buf->last_in_chain = 1; cl->buf->sync = 1; last = 1; }