Skip to content

Commit

Permalink
Remove x-webkit-deflate-frame dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
abursavich authored and nhooyr committed Oct 13, 2023
1 parent d7227c2 commit 6411d91
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
16 changes: 0 additions & 16 deletions accept_test.go
Expand Up @@ -419,22 +419,6 @@ func Test_selectDeflate(t *testing.T) {
},
expOK: true,
},
// {
// name: "x-webkit-deflate-frame",
// mode: CompressionNoContextTakeover,
// reqSecWebSocketExtensions: "x-webkit-deflate-frame; no_context_takeover",
// respSecWebSocketExtensions: "x-webkit-deflate-frame; no_context_takeover",
// expCopts: &compressionOptions{
// clientNoContextTakeover: true,
// serverNoContextTakeover: true,
// },
// },
// {
// name: "x-webkit-deflate/error",
// mode: CompressionNoContextTakeover,
// reqSecWebSocketExtensions: "x-webkit-deflate-frame; max_window_bits",
// error: true,
// },
}

for _, tc := range testCases {
Expand Down
6 changes: 1 addition & 5 deletions compress.go
Expand Up @@ -12,11 +12,7 @@ import (
// CompressionMode represents the modes available to the deflate extension.
// See https://tools.ietf.org/html/rfc7692
//
// A compatibility layer is implemented for the older deflate-frame extension used
// 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.
// But it is currently disabled due to Safari bugs. See https://github.com/nhooyr/websocket/issues/218
// Works in all browsers except Safari which does not implement the deflate extension.
type CompressionMode int

const (
Expand Down
7 changes: 1 addition & 6 deletions ws_js.go
Expand Up @@ -485,12 +485,7 @@ func CloseStatus(err error) StatusCode {

// CompressionMode represents the modes available to the deflate extension.
// See https://tools.ietf.org/html/rfc7692
//
// A compatibility layer is implemented for the older deflate-frame extension used
// 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
// Works in all browsers except Safari which does not implement the deflate extension.
type CompressionMode int

const (
Expand Down

0 comments on commit 6411d91

Please sign in to comment.