1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-04 10:47:20 +00:00

Update gzip_response_writer.go

The Context.SendFile function Send file size more than 65536 byte with bug.

Former-commit-id: 5ad4c80eb20a7e6663fc460ec68e238dd45a918a
This commit is contained in:
hyhkjiy
2018-03-14 19:46:55 +08:00
committed by GitHub
parent 56215eeb71
commit 0df0bb8052

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.