Skip to content

Gzip middleware doesn't automatically decompress incomming requests #986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lunemec opened this issue Aug 9, 2017 · 1 comment
Closed
Labels

Comments

@lunemec
Copy link

lunemec commented Aug 9, 2017

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

@stale
Copy link

stale bot commented Nov 30, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant