From 4308a5ca45af44738d7328a9c5d238bf035c7783 Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Fri, 25 Oct 2013 17:31:39 -0700 Subject: [PATCH] bugfix: applied the gzip_flush_bug.patch to the nginx core. see also http://mailman.nginx.org/pipermail/nginx-devel/2013-October/004429.html --- patches/nginx-1.4.3-gzip_flush_bug.patch | 19 +++++++++++++++++++ util/mirror-tarballs | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 patches/nginx-1.4.3-gzip_flush_bug.patch diff --git a/patches/nginx-1.4.3-gzip_flush_bug.patch b/patches/nginx-1.4.3-gzip_flush_bug.patch new file mode 100644 index 0000000..d4b9e11 --- /dev/null +++ b/patches/nginx-1.4.3-gzip_flush_bug.patch @@ -0,0 +1,19 @@ +--- nginx-1.4.3/src/http/modules/ngx_http_gzip_filter_module.c 2013-10-08 05:07:14.000000000 -0700 ++++ nginx-1.4.3-patched/src/http/modules/ngx_http_gzip_filter_module.c 2013-10-25 17:00:00.712697908 -0700 +@@ -433,7 +433,15 @@ ngx_http_gzip_body_filter(ngx_http_reque + if (ctx->out == NULL) { + ngx_http_gzip_filter_free_copy_buf(r, ctx); + +- return ctx->busy ? NGX_AGAIN : NGX_OK; ++ if (ctx->busy) { ++ if (in == NULL) { ++ return ngx_http_next_body_filter(r, NULL); ++ } ++ ++ return NGX_AGAIN; ++ } ++ ++ return NGX_OK; + } + + if (!ctx->gzheader) { diff --git a/util/mirror-tarballs b/util/mirror-tarballs index c6c995f..457ab35 100755 --- a/util/mirror-tarballs +++ b/util/mirror-tarballs @@ -187,6 +187,10 @@ if [ "$answer" = "N" ]; then echo fi +echo "$info_txt applying the gzip_flush_bug patch for lua $ver" +patch -p1 < $root/patches/nginx-$ver-gzip_flush_bug.patch || exit 1 +echo + rm -f *.patch || exit 1 cd .. || exit 1