-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Contributor Friendly ♥💰 Bounty $100If you complete this issue we'll pay you $100 on OpenCollective!If you complete this issue we'll pay you $100 on OpenCollective!
Description
Context
I'm using an API that returns a gzipped response, but the reported Content-Encoding
is x-gzip
rather than gzip
, so urllib3 fails to decompress it.
According to RFC 9110:
A recipient SHOULD consider "x-gzip" to be equivalent to "gzip".
Therefore, I would expect e.g. Response.read(decode_content=True)
to automatically decompress such responses.
Unfortunately, I can't find a public server that would produce such responses, so I can't provide a simple reproducer.
Alternatives
I can set decode_content=False
and gunzip the content manually.
Duplicate
Has the feature been requested before?
Not that I could find.
Contribution
Would you be willing to submit a PR?
Probably not.
pquentin
Metadata
Metadata
Assignees
Labels
Contributor Friendly ♥💰 Bounty $100If you complete this issue we'll pay you $100 on OpenCollective!If you complete this issue we'll pay you $100 on OpenCollective!