aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2015-12-08 17:39:56 +0300
committerRoman Arutyunyan <arut@nginx.com>2015-12-08 17:39:56 +0300
commit56fda3265bc74c2cd22ce7b912515f5d331be10b (patch)
tree585ae65de560809880fb57aa4340be73f0ef5d5e
parent5c1f76f0e933335784ebb4811965230ab8f20233 (diff)
Slice filter: terminate first slice with last_in_chain flag.
This flag makes sub filter flush buffered data and optimizes allocation in copy filter.
-rw-r--r--src/http/modules/ngx_http_slice_filter_module.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_slice_filter_module.c b/src/http/modules/ngx_http_slice_filter_module.c
index aa2a0344..5e149b4c 100644
--- a/src/http/modules/ngx_http_slice_filter_module.c
+++ b/src/http/modules/ngx_http_slice_filter_module.c
@@ -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;
}