From 4edcada120234320ad58e8b6cd82b823aae4326f Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Mon, 13 Apr 2020 22:56:56 -0400 Subject: [PATCH] Disable safari compression compatability layer Closes #218 --- accept.go | 5 +++-- compress.go | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/accept.go b/accept.go index 47e20b52..6bed54da 100644 --- a/accept.go +++ b/accept.go @@ -231,8 +231,9 @@ func acceptCompression(r *http.Request, w http.ResponseWriter, mode CompressionM switch ext.name { case "permessage-deflate": return acceptDeflate(w, ext, mode) - case "x-webkit-deflate-frame": - return acceptWebkitDeflate(w, ext, mode) + // Disabled for now, see https://github.com/nhooyr/websocket/issues/218 + // case "x-webkit-deflate-frame": + // return acceptWebkitDeflate(w, ext, mode) } } return nil, nil diff --git a/compress.go b/compress.go index 57446d01..80b46d1c 100644 --- a/compress.go +++ b/compress.go @@ -7,6 +7,7 @@ package websocket // by safari. See https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06 // It will work the same in every way except that we cannot signal to the peer we // want to use no context takeover on our side, we can only signal that they should. +// It is however currently disabled due to Safari bugs. See https://github.com/nhooyr/websocket/issues/218 type CompressionMode int const (