Closed
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.