mirror of https://github.com/openresty/openresty
bugfix: applied the patch to fix a new regression in nginx 1.7.7's ngx_gzip and ngx_gunzip modules that could lead to request hang when the downstream is slow to write to.
parent
46a5fd3bba
commit
b6d3a5cf7b
@ -0,0 +1,40 @@
|
||||
# HG changeset patch
|
||||
# User Yichun Zhang <agentzh@gmail.com>
|
||||
# Date 1414804249 25200
|
||||
# Fri Oct 31 18:10:49 2014 -0700
|
||||
# Node ID 38a74e59f199edafad0a8caae5cfc921ab3302e8
|
||||
# Parent dff86e2246a53b0f4a61935cd5c8c0a0f66d0ca2
|
||||
Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.
|
||||
|
||||
After the system send buffer is full, NULL incoming chains are used to
|
||||
flush pending output upon new write events. The current gzip and gunzip
|
||||
filters may intercept NULL chains and keep the data stalling in
|
||||
nginx's own send buffers, leading to request hanging (until send
|
||||
timeout).
|
||||
|
||||
This regression had appeared in nginx 1.7.7.
|
||||
|
||||
diff -r dff86e2246a5 -r 38a74e59f199 src/http/modules/ngx_http_gunzip_filter_module.c
|
||||
--- a/src/http/modules/ngx_http_gunzip_filter_module.c Mon Aug 25 13:41:31 2014 +0400
|
||||
+++ b/src/http/modules/ngx_http_gunzip_filter_module.c Fri Oct 31 18:10:49 2014 -0700
|
||||
@@ -200,7 +200,7 @@ ngx_http_gunzip_body_filter(ngx_http_req
|
||||
}
|
||||
}
|
||||
|
||||
- if (ctx->nomem) {
|
||||
+ if (ctx->nomem || in == NULL) {
|
||||
|
||||
/* flush busy buffers */
|
||||
|
||||
diff -r dff86e2246a5 -r 38a74e59f199 src/http/modules/ngx_http_gzip_filter_module.c
|
||||
--- a/src/http/modules/ngx_http_gzip_filter_module.c Mon Aug 25 13:41:31 2014 +0400
|
||||
+++ b/src/http/modules/ngx_http_gzip_filter_module.c Fri Oct 31 18:10:49 2014 -0700
|
||||
@@ -373,7 +373,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 */
|
||||
|
Loading…
Reference in New Issue