comparison src/http/ngx_http_special_response.c @ 6722:6136a51f9c21

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.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 03 Oct 2016 20:48:51 +0300
parents 654d2dae97d3
children 92ad1c92bcf9
comparison
equal deleted inserted replaced
6721:48bab8b83f4e 6722:6136a51f9c21
790 } 790 }
791 791
792 b->last = ngx_cpymem(p, ngx_http_msie_refresh_tail, 792 b->last = ngx_cpymem(p, ngx_http_msie_refresh_tail,
793 sizeof(ngx_http_msie_refresh_tail) - 1); 793 sizeof(ngx_http_msie_refresh_tail) - 1);
794 794
795 b->last_buf = 1; 795 b->last_buf = (r == r->main) ? 1 : 0;
796 b->last_in_chain = 1; 796 b->last_in_chain = 1;
797 797
798 out.buf = b; 798 out.buf = b;
799 out.next = NULL; 799 out.next = NULL;
800 800