Welcome! Log In Create A New Profile

Advanced

Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh)
October 31, 2014 09:22PM
# 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 */
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 1094 October 31, 2014 09:22PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Maxim Dounin 348 November 03, 2014 05:06PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 360 November 03, 2014 05:36PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Maxim Dounin 391 November 03, 2014 07:56PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 354 November 04, 2014 03:44PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Maxim Dounin 469 November 05, 2014 10:42AM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 303 November 05, 2014 08:04PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 336 November 05, 2014 08:10PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 375 November 10, 2014 05:26PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 301
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready