Skip to content

Commit 474b41b

Browse files
segevfinerappleboy
andauthored
Remove Content-Length in more cases (#27)
Co-authored-by: Bo-Yi Wu <[email protected]>
1 parent 3aff126 commit 474b41b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gzip.go

+2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ type gzipWriter struct {
2323
}
2424

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

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

0 commit comments

Comments
 (0)