Skip to content

GZIP body decompression before decoding through logging side effect #1399

Open
@OlgaMaciaszek

Description

@OlgaMaciaszek

While upgrading Feign in SC OpenFeign to versions: 11.1, 11.2 (btw., I can't see this tag in repo, but the artifact is present in mvn), I have stumbled upon an issue:

When GZIP is set as CONTENT-ENCODING, the response body is now being wrapped with GZIPInputStream. When logging is not enabled, a response this GZIPInputStream body is then passed to decoders for further handling.

However, when logging is enabled, the GZIP body is decompressed here (through calling read(byte[] buf, int off, int len) from java.util.zip.GZIPInputStream.java) and then this decompressed byte array is set as response body here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected or incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions