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 63944bff63
commit 0c2ce9c2ff

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;
}