Skip to content

Commit 2bd4f79

Browse files
committed
feat(serverCompress): skip compressing transfer-encoding response
1 parent 9cdc9f8 commit 2bd4f79

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/serverCompress/writer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ var encodings = []string{contentEncGzip, contentEncDeflate}
1515

1616
func GetWriter(w http.ResponseWriter, r *http.Request) (wc io.WriteCloser, ok bool) {
1717
header := w.Header()
18+
if len(header.Get("Transfer-Encoding")) > 0 {
19+
return nil, false
20+
}
1821
if len(header.Get("Content-Encoding")) > 0 {
1922
return nil, false
2023
}

0 commit comments

Comments
 (0)