Skip to content

Gzip middleware doesn't automatically decompress incomming requests #986

Closed
@lunemec

Description

@lunemec

Issue Description

Upon server receiving POST request with content-encoding: gzip set the gzip middleware doesn't decompress the data.
This causes strange errors when trying to Bind() data (for example form/multipart): multipart: NextPart: EOF.

When decompressing the ctx.Request().Body manually inside the handler everything works as expected.

Expected behaviour

GzipMiddleware should? (probably) handle compression and decompression transparently, or it should be stated in the Bind examples it does NOT.

Actual behaviour

GzipMiddleware only compresses outgoing responses.

Steps to reproduce

Send any POST that contains form/multipart and is gzipped.

Version/commit

current master

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