Slice filter: terminate first slice with last_in_chain flag.

This flag makes sub filter flush buffered data and optimizes allocation in copy
filter.
This commit is contained in:
Roman Arutyunyan 2015-12-08 17:39:56 +03:00
parent 5c1f76f0e9
commit 56fda3265b

View File

@ -222,6 +222,7 @@ ngx_http_slice_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
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;
ctx->last = 1;
}