]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: compression: the deflate algorithm must use global settings as well
authorWilly Tarreau <w@1wt.eu>
Sun, 28 Apr 2013 06:52:52 +0000 (08:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 28 Apr 2013 07:01:11 +0000 (09:01 +0200)
commitc5599e7c498ea51a11fa939026c9249012eaa19c
treef752eb3335ab6998926e9e17513a36f97e4a7e72
parentf27af0dcc67c0c4e1d679b5017f1f495f4ba6704
BUG/MEDIUM: compression: the deflate algorithm must use global settings as well

Global compression settings (windowsize and memlevel) were only considered
for the gzip algorithm but not the deflate algorithm. Since a single allocator
is used for both algos, if gzip was first initialized the memory with parameters
smaller than default, then initializing deflate after with default settings
would result in overusing the small allocated areas.

To fix this, we make use of deflateInit2() for deflate_init() as well.

Thanks to Godbach for reporting this bug, introduced by in 1.5-dev13 by commit
8b52bb38. No backport is needed.
src/compression.c