Skip to content

Commit

Permalink
Merge pull request #89 from andreynering/patch-1
Browse files Browse the repository at this point in the history
Fix "invalid response" error in Gzip. Closes #66
  • Loading branch information
appleboy authored Oct 14, 2016
2 parents 42277b1 + f9e83cb commit cf28f84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gzip/gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func Gzip(level int) gin.HandlerFunc {
c.Header("Vary", "Accept-Encoding")
c.Writer = &gzipWriter{c.Writer, gz}
defer func() {
c.Header("Content-Length", "")
c.Header("Content-Length", "0")
gz.Close()
}()
c.Next()
Expand Down

0 comments on commit cf28f84

Please sign in to comment.