Skip to content

Commit

Permalink
Slice filter: terminate first slice with last_in_chain flag.
Browse files Browse the repository at this point in the history
This flag makes sub filter flush buffered data and optimizes allocation in copy
filter.
  • Loading branch information
arut committed Dec 8, 2015
1 parent 5c1f76f commit 56fda32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/http/modules/ngx_http_slice_filter_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 56fda32

Please sign in to comment.