Merge pull request #931 from hyhkjiy/patch-1

Update gzip_response_writer.go

Former-commit-id: 35d47ed1354ec72959c168563d43cdd63a269fdc
This commit is contained in:
Gerasimos (Makis) Maropoulos 2018-03-16 12:33:24 +02:00 committed by GitHub
commit 75601979c5

View File

@ -108,7 +108,7 @@ func (w *GzipResponseWriter) EndResponse() {
func (w *GzipResponseWriter) Write(contents []byte) (int, error) {
// save the contents to serve them (only gzip data here)
w.chunks = append(w.chunks, contents...)
return len(w.chunks), nil
return len(contents), nil
}
// Writef formats according to a format specifier and writes to the response.