Skip to content

Commit a320376

Browse files
committed
fix(serverCompress): skip compressing to range request
1 parent 698fc38 commit a320376

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/serverCompress/writer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ const contentEncDeflate = "deflate"
1414
var encodings = []string{contentEncGzip, contentEncDeflate}
1515

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

0 commit comments

Comments
 (0)