]> git.kaiwu.me - nginx.git/commitdiff
Gzip, gunzip: flush pending data when incoming chain is NULL.
authorYichun Zhang <agentzh@gmail.com>
Mon, 28 Oct 2013 22:01:36 +0000 (15:01 -0700)
committerYichun Zhang <agentzh@gmail.com>
Mon, 28 Oct 2013 22:01:36 +0000 (15:01 -0700)
src/http/modules/ngx_http_gunzip_filter_module.c
src/http/modules/ngx_http_gzip_filter_module.c

index d4e41e4a0076e664bff3d7619e45f0f9cb97a7e0..c2d504e0d8d38cbc3ff7c9f9a45950ecf9cb3a45 100644 (file)
@@ -199,7 +199,7 @@ ngx_http_gunzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
         }
     }
 
-    if (ctx->nomem) {
+    if (ctx->nomem || in == NULL) {
 
         /* flush busy buffers */
 
index 837b0bc98953991689fa25c60f3118b81f9a1580..ea1f1d0b9a226ace7a35875ccca94f056b4869a2 100644 (file)
@@ -372,7 +372,7 @@ ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
         r->connection->buffered |= NGX_HTTP_GZIP_BUFFERED;
     }
 
-    if (ctx->nomem) {
+    if (ctx->nomem || in == NULL) {
 
         /* flush busy buffers */