Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Be explicitly lenient with gzip decompression by always requesting `zlib` to flush the input data and never explicitly ending the `zlib` input. The behavioural difference is that on Node ≥ 6, which has a slightly stricter gzip decoding process than previous Node versions, malformed but otherwise acceptable server responses are still properly decompressed (the most common example being a missing checksum at the stream end). This aligns behaviour with cURL, which always uses the `Z_SYNC_FLUSH` flag for decompression. On the downside, accidental truncation of a response is no longer detected on the compression layer. Ref: nodejs/node#8701 (comment) Fixes: #2482
- Loading branch information
Showing
2 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters