disable response compression on websocket (#841)

This commit is contained in:
faceair 2020-10-17 05:32:34 -05:00 committed by GitHub
parent 2ed069c3bc
commit 84e3881c0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -306,6 +306,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