]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: compression: dynamic level increase
authorWilliam Lallemand <wlallemand@exceliance.fr>
Tue, 20 Nov 2012 16:11:13 +0000 (17:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Nov 2012 01:15:16 +0000 (02:15 +0100)
Using compression rate limit, the compression level wasn't taking care
of the max compression level during a session because the test was done
on the wrong variable.

src/compression.c

index 1df0f57a75c93bc7faf8a5665d6a0711c47ac8be..2dc893aa56e0cc363a62f8f33836e5046e811b0e 100644 (file)
@@ -570,7 +570,7 @@ int deflate_flush(struct comp_ctx *comp_ctx, struct buffer *out, int flag)
                                deflateParams(&comp_ctx->strm, comp_ctx->cur_lvl, Z_DEFAULT_STRATEGY);
                        }
 
-               } else if (comp_ctx->cur_lvl < global.comp_rate_lim) {
+               } else if (comp_ctx->cur_lvl < global.tune.comp_maxlevel) {
                        /* increase level */
                        comp_ctx->cur_lvl++ ;
                        deflateParams(&comp_ctx->strm, comp_ctx->cur_lvl, Z_DEFAULT_STRATEGY);