Echo: Gzip middleware doesn't automatically decompress incomming requests

Created on 9 Aug 2017  路  1Comment  路  Source: labstack/echo

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

wontfix

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wangxianzhuo picture wangxianzhuo  路  4Comments

arun0009 picture arun0009  路  3Comments

kyokomi picture kyokomi  路  3Comments

spielstein picture spielstein  路  3Comments

runner-mei picture runner-mei  路  4Comments