Skip to content

Support Content-Encoding: x-gzip #3174

Closed
@SpecLad

Description

@SpecLad

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy