[njs] Stream: fixed processing empty output chain in body filter.

Dmitry Volyntsev xeioex at nginx.com
Tue May 28 14:05:29 UTC 2019


details:   https://hg.nginx.org/njs/rev/77e4b95109d4
branches:  
changeset: 989:77e4b95109d4
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Tue May 28 17:04:40 2019 +0300
description:
Stream: fixed processing empty output chain in body filter.

This closes #1735 on trac.

diffstat:

 nginx/ngx_stream_js_module.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 6b7042a20523 -r 77e4b95109d4 nginx/ngx_stream_js_module.c
--- a/nginx/ngx_stream_js_module.c	Tue May 28 17:04:33 2019 +0300
+++ b/nginx/ngx_stream_js_module.c	Tue May 28 17:04:40 2019 +0300
@@ -601,7 +601,7 @@ ngx_stream_js_body_filter(ngx_stream_ses
 
     *ctx->last_out = NULL;
 
-    if (out != NULL) {
+    if (out != NULL || c->buffered) {
         rc = ngx_stream_next_filter(s, out, from_upstream);
 
         ngx_chain_update_chains(c->pool, &ctx->free, &ctx->busy, &out,


More information about the nginx-devel mailing list