]> granicus.if.org Git - curl/commit
content_encoding: rework zlib_inflate
authorPatrick Monnerat <patrick@monnerat.net>
Wed, 20 Dec 2017 15:02:42 +0000 (16:02 +0100)
committerPatrick Monnerat <patrick@monnerat.net>
Wed, 20 Dec 2017 15:02:42 +0000 (16:02 +0100)
commit4acc9d3d1a6774f4c00079bdba0fafc51afcbd6a
tree02eb4c32b13aee8d982fb1c768cb4ff12182fd00
parente639d4ca4d794c222dde4680d9ff35053f501042
content_encoding: rework zlib_inflate

- When zlib version is < 1.2.0.4, process gzip trailer before considering
extra data as an error.
- Inflate with Z_BLOCK instead of Z_SYNC_FLUSH to maximize correct data
and minimize corrupt data output.
- Do not try to restart deflate decompression in raw mode if output has
started or if the leading data is not available anymore.
- New test 232 checks inflating raw-deflated content.

Closes #2068
lib/content_encoding.c
tests/data/Makefile.inc
tests/data/test232 [new file with mode: 0644]