Gzipping proxied content after using subs_filter fails

姚伟斌 nbubingo at gmail.com
Mon Aug 13 02:34:09 UTC 2012


Can you try the latest code from github:

I'm just refactoring this module. And I want to add more verification
with the flush buffer. There may be bugs with the old version.

Thanks for your report.

2012/8/10 Maxim Dounin <mdounin at mdounin.ru>:
> Hello!
> On Thu, Aug 09, 2012 at 05:28:06PM -0400, abstein2 wrote:
>> As the title says, I'm having an issue with gzipping proxied web pages
>> after using subs_filter. It doesn't always happen, but it looks like
>> whenever a page exceeds the size of one of my proxy_buffers I get an
>> error in the error log saying:
>> [alert] 18544#0: *490084 deflate() failed: 2, -5 while sending to
>> client, client: xxx.xxx.xxx.xxx, server: www.test.com, request: "GET /
>> HTTP/1.1", upstream: "http://xxx.xxx.xxx.xxx:80/", host: "www.test.com",
>> referrer: "http://xxx.xxx.xxx.xxx/"
> Here nginx did deflate with Z_SYNC_FLUSH (2) and deflate()
> returned error Z_BUF_ERROR (-5, no progress possible).  The error
> message suggests you are using an old nginx, and subs filter
> somehow triggers the problem as fixed here:
> http://trac.nginx.org/nginx/changeset/4469/nginx
> Changes with nginx 1.1.15:
>     *) Bugfix: calling $r->flush() multiple times might cause errors in the
>        ngx_http_gzip_filter_module.
> It's not clear why subs filter triggers flush (and does so twice in a row),
> most likely it's a bug in subs filter (you may want to ask it's author), but
> upgrading nginx to 1.1.15+ should resolve the problem.
> [...]
> Maxim Dounin
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

More information about the nginx mailing list