[nginx] Slice filter: terminate first slice with last_in_chain f...

Roman Arutyunyan arut at nginx.com
Tue Dec 8 14:41:35 UTC 2015


details:   http://hg.nginx.org/nginx/rev/4f0f4f02c98f
branches:  
changeset: 6322:4f0f4f02c98f
user:      Roman Arutyunyan <arut at nginx.com>
date:      Tue Dec 08 17:39:56 2015 +0300
description:
Slice filter: terminate first slice with last_in_chain flag.

This flag makes sub filter flush buffered data and optimizes allocation in copy
filter.

diffstat:

 src/http/modules/ngx_http_slice_filter_module.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r bc9ea464e354 -r 4f0f4f02c98f src/http/modules/ngx_http_slice_filter_module.c
--- a/src/http/modules/ngx_http_slice_filter_module.c	Tue Dec 08 17:39:56 2015 +0300
+++ b/src/http/modules/ngx_http_slice_filter_module.c	Tue Dec 08 17:39:56 2015 +0300
@@ -222,6 +222,7 @@ ngx_http_slice_body_filter(ngx_http_requ
     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;
         }



More information about the nginx-devel mailing list