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

Using int64 instead of uint64 for response size

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2015-05-15 15:24:47 -07:00
parent 1ee3bc23e3
commit d90395cf2b
3 changed files with 8 additions and 8 deletions

View File

@ -9,13 +9,13 @@ import (
)
type (
gzipResponseWriter struct {
gzipWriter struct {
io.Writer
*echo.Response
}
)
func (g gzipResponseWriter) Write(b []byte) (int, error) {
func (g gzipWriter) Write(b []byte) (int, error) {
return g.Writer.Write(b)
}
@ -31,7 +31,7 @@ func Gzip() echo.MiddlewareFunc {
w := gzip.NewWriter(c.Response.Writer)
defer w.Close()
gw := gzipResponseWriter{Writer: w, Response: c.Response}
gw := gzipWriter{Writer: w, Response: c.Response}
c.Response.Header().Set(echo.ContentEncoding, scheme)
c.Response = &echo.Response{Writer: gw}
if he := h(c); he != nil {