1
0
mirror of https://github.com/labstack/echo.git synced 2025-06-19 00:27:34 +02:00

Revert "Fixed Request.Out"

This reverts commit cced590a16.
This commit is contained in:
Vishal Rana
2015-12-21 15:18:53 -08:00
parent cced590a16
commit 72050d765b
8 changed files with 237 additions and 191 deletions

View File

@ -53,7 +53,7 @@ func Gzip() echo.MiddlewareFunc {
return func(h echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
c.Response().Header().Add(echo.Vary, echo.AcceptEncoding)
if strings.Contains(c.Request().Header().Get(echo.AcceptEncoding), scheme) {
if strings.Contains(c.Request().Header.Get(echo.AcceptEncoding), scheme) {
w := writerPool.Get().(*gzip.Writer)
w.Reset(c.Response().Writer())
defer func() {