Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More lenient gzip decompression #2492

Merged
merged 1 commit into from Dec 21, 2016
Merged

Commits on Dec 21, 2016

  1. More lenient gzip decompression

    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: request#2482
    addaleax committed Dec 21, 2016
    Copy the full SHA
    71081b6 View commit details
    Browse the repository at this point in the history