1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Close gzip writer

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-03-19 16:17:43 -07:00
parent c4caeb8ffb
commit 576dfeb71d

View File

@ -53,6 +53,7 @@ func GzipFromConfig(config GzipConfig) echo.MiddlewareFunc {
defer func() {
w.Close()
pool.Put(w)
w.Close()
}()
g := gzipResponseWriter{Response: c.Response(), Writer: w}
c.Response().Header().Set(echo.ContentEncoding, scheme)