diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2017-11-07 00:46:59 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2017-11-09 01:36:50 -0500 |
commit | fa64b0fc4bb8e25fd831db8b9328eeec5cc209c1 (patch) | |
tree | aaeb3ccabd84d3f43f5bf1a98add42e4c2b7389e /scripts/installcheck.sh | |
parent | 19e66e53629de4e320a0ceafef687a861ec22fab (diff) |
content_encoding: fix inflate_stream for no bytes available
- Don't call zlib's inflate() when avail_in stream bytes is 0.
This is a follow up to the parent commit 19e66e5. Prior to that change
libcurl's inflate_stream could call zlib's inflate even when no bytes
were available, causing inflate to return Z_BUF_ERROR, and then
inflate_stream would treat that as a hard error and return
CURLE_BAD_CONTENT_ENCODING.
According to the zlib FAQ, Z_BUF_ERROR is not fatal.
This bug would happen randomly since packet sizes are arbitrary. A test
of 10,000 transfers had 55 fail (ie 0.55%).
Ref: https://zlib.net/zlib_faq.html#faq05
Closes https://github.com/curl/curl/pull/2060
Diffstat (limited to 'scripts/installcheck.sh')
0 files changed, 0 insertions, 0 deletions