Skip to content

Commit

Permalink
Remove Content-Length in more cases (#27)
Browse files Browse the repository at this point in the history
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information
segevfiner and appleboy authored Sep 16, 2020
1 parent 3aff126 commit 474b41b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ type gzipWriter struct {
}

func (g *gzipWriter) WriteString(s string) (int, error) {
g.Header().Del("Content-Length")
return g.writer.Write([]byte(s))
}

func (g *gzipWriter) Write(data []byte) (int, error) {
g.Header().Del("Content-Length")
return g.writer.Write(data)
}

Expand Down

0 comments on commit 474b41b

Please sign in to comment.