]> git.kaiwu.me - njs.git/commitdiff
Stream: fixed processing empty output chain in body filter.
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 28 May 2019 14:04:40 +0000 (17:04 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Tue, 28 May 2019 14:04:40 +0000 (17:04 +0300)
This closes #1735 on trac.

nginx/ngx_stream_js_module.c

index bdba8bf6c1f1e8812b6a6d50bc8dac78a8febb7f..4375ae1aa1e8550addbfab4106070f133b8bd565 100644 (file)
@@ -601,7 +601,7 @@ ngx_stream_js_body_filter(ngx_stream_session_t *s, ngx_chain_t *in,
 
     *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,