[nginx] Gzip, gunzip: flush pending data when incoming chain is ...

Maxim Dounin mdounin at mdounin.ru
Thu Oct 31 00:06:32 UTC 2013


details:   http://hg.nginx.org/nginx/rev/c52a761a2029
branches:  
changeset: 5432:c52a761a2029
user:      Yichun Zhang <agentzh at gmail.com>
date:      Mon Oct 28 15:01:36 2013 -0700
description:
Gzip, gunzip: flush pending data when incoming chain is NULL.

diffstat:

 src/http/modules/ngx_http_gunzip_filter_module.c |  2 +-
 src/http/modules/ngx_http_gzip_filter_module.c   |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff --git a/src/http/modules/ngx_http_gunzip_filter_module.c b/src/http/modules/ngx_http_gunzip_filter_module.c
--- a/src/http/modules/ngx_http_gunzip_filter_module.c
+++ b/src/http/modules/ngx_http_gunzip_filter_module.c
@@ -199,7 +199,7 @@ ngx_http_gunzip_body_filter(ngx_http_req
         }
     }
 
-    if (ctx->nomem) {
+    if (ctx->nomem || in == NULL) {
 
         /* flush busy buffers */
 
diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c
--- a/src/http/modules/ngx_http_gzip_filter_module.c
+++ b/src/http/modules/ngx_http_gzip_filter_module.c
@@ -372,7 +372,7 @@ ngx_http_gzip_body_filter(ngx_http_reque
         r->connection->buffered |= NGX_HTTP_GZIP_BUFFERED;
     }
 
-    if (ctx->nomem) {
+    if (ctx->nomem || in == NULL) {
 
         /* flush busy buffers */
 



More information about the nginx-devel mailing list