Support for 3rd party zlib libraries
Maxim Dounin
mdounin at mdounin.ru
Wed Jul 30 00:05:50 UTC 2014
Hello!
On Tue, Jul 29, 2014 at 04:06:11PM -0700, Yichun Zhang (agentzh) wrote:
> 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 */
Skipping this block is a bad idea - it means that small
responses will allocate many unneeded memory.
(And, as already pointed out by Piotr, the original question isn't
about IPP zlib.)
--
Maxim Dounin
http://nginx.org/
More information about the nginx
mailing list