Support for 3rd party zlib libraries

Yichun Zhang (agentzh) agentzh at gmail.com
Tue Jul 29 23:06:11 UTC 2014


Hello!

On Tue, Jul 29, 2014 at 3:47 PM, Richard Stanway wrote:
> Thank you for the patch. This solves the issue with streamed responses,
> however when the "if (r->headers_out.content_length_n > 0)" branch is taken,
> eg with static content, I still receive the 2nd alert type below.

Oh, we should probably skip that condition altogether for IPP zlib.
The formula is accurate and was copied directly from the IPP zlib
source code. Try this additional patch:

diff -r 2a54efe7a747 src/http/modules/ngx_http_gzip_filter_module.c
--- a/src/http/modules/ngx_http_gzip_filter_module.c Tue Jul 29
14:19:37 2014 -0700
+++ b/src/http/modules/ngx_http_gzip_filter_module.c Tue Jul 29
16:06:03 2014 -0700
@@ -492,6 +492,7 @@ ngx_http_gzip_filter_memory(ngx_http_req
     wbits = conf->wbits;
     memlevel = conf->memlevel;

+#if !NGX_HAVE_ZLIB_IPP
     if (r->headers_out.content_length_n > 0) {

         /* the actual zlib window size is smaller by 262 bytes */
@@ -505,6 +506,7 @@ ngx_http_gzip_filter_memory(ngx_http_req
             memlevel = 1;
         }
     }
+#endif

     ctx->wbits = wbits;
     ctx->memlevel = memlevel;



More information about the nginx mailing list