Skip to content

Incompatibility between urllib3 1.x and 2.x with the same cassette on a gzipped response #942

@GenericMadScientist

Description

@GenericMadScientist

urllib3 1.x and 2.x behave differently when reading a gzipped response from a cassette. If the cassette is made with urllib3 1.x, then the gzipped body is saved as base64. 1.x is able to read this fine and the request returns the decompressed data. However, if this cassette is then used on 2.x then the response's data is compressed.

Here is a minimal repo with a test illustrating the difference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions