disable response compression on websocket (#841)

This commit is contained in:
faceair 2020-10-17 05:32:34 -05:00 committed by Aliaksandr Valialkin
parent 9b91305a31
commit 0093ee3cd9

View File

@ -276,6 +276,9 @@ func maybeGzipResponseWriter(w http.ResponseWriter, r *http.Request) http.Respon
if *disableResponseCompression {
return w
}
if r.Header.Get("Connection") == "Upgrade" {
return w
}
ae := r.Header.Get("Accept-Encoding")
if ae == "" {
return w