summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_special_response.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2016-10-03 20:48:51 +0300
committerRoman Arutyunyan <arut@nginx.com>2016-10-03 20:48:51 +0300
commitf3bbd1c87f0bc97367603c3254c1465d3c622d1f (patch)
treeb6050595c803493f32b0bef7f590a4fadbd1f64c /src/http/ngx_http_special_response.c
parent2e12afb955a211f55bfdcb3f3d92fc1b42d9dc99 (diff)
downloadnginx-f3bbd1c87f0bc97367603c3254c1465d3c622d1f.tar.gz
nginx-f3bbd1c87f0bc97367603c3254c1465d3c622d1f.tar.bz2
Do not set last_buf flag in subrequests.
The last_buf flag should only be set in the last buffer of the main request. Otherwise, several last_buf flags can appear in output. This can, for example, break the chunked filter, which will include several final chunks in output.
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r--src/http/ngx_http_special_response.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 64e5acd55..7692f801f 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -792,7 +792,7 @@ ngx_http_send_refresh(ngx_http_request_t *r)
b->last = ngx_cpymem(p, ngx_http_msie_refresh_tail,
sizeof(ngx_http_msie_refresh_tail) - 1);
- b->last_buf = 1;
+ b->last_buf = (r == r->main) ? 1 : 0;
b->last_in_chain = 1;
out.buf = b;