diff --git a/lib/web/websocket/connection.js b/lib/web/websocket/connection.js index 3a9c649aaac..ce067f74d69 100644 --- a/lib/web/websocket/connection.js +++ b/lib/web/websocket/connection.js @@ -91,7 +91,7 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, // 9. Let permessageDeflate be a user-agent defined // "permessage-deflate" extension header value. // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 - const permessageDeflate = options.node?.['client-extensions'] ?? '' + const permessageDeflate = 'permessage-deflate' // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to // request’s header list. diff --git a/lib/web/websocket/websocket.js b/lib/web/websocket/websocket.js index a0e66f38d66..4243f6c5830 100644 --- a/lib/web/websocket/websocket.js +++ b/lib/web/websocket/websocket.js @@ -549,14 +549,6 @@ webidl.converters['DOMString or sequence'] = function (V, prefix, arg return webidl.converters.DOMString(V, prefix, argument) } -webidl.converters.WebSocketInitNodeOptions = webidl.dictionaryConverter([ - { - key: 'client-extensions', - converter: webidl.converters.DOMString, - defaultValue: () => '' - } -]) - // This implements the proposal made in https://github.com/whatwg/websockets/issues/42 webidl.converters.WebSocketInit = webidl.dictionaryConverter([ { @@ -572,11 +564,6 @@ webidl.converters.WebSocketInit = webidl.dictionaryConverter([ { key: 'headers', converter: webidl.nullableConverter(webidl.converters.HeadersInit) - }, - { - key: 'node', - converter: webidl.converters.WebSocketInitNodeOptions, - defaultValue: () => ({}) } ]) diff --git a/test/autobahn/client.js b/test/autobahn/client.js index a2c74522c71..41bf1d61063 100644 --- a/test/autobahn/client.js +++ b/test/autobahn/client.js @@ -6,25 +6,19 @@ let currentTest = 1 let testCount const autobahnFuzzingserverUrl = process.env.FUZZING_SERVER_URL || 'ws://localhost:9001' -const options = { - node: { - 'client-extensions': 'permessage-deflate' - } -} function nextTest () { let ws if (currentTest > testCount) { - ws = new WebSocket(`${autobahnFuzzingserverUrl}/updateReports?agent=undici`, options) + ws = new WebSocket(`${autobahnFuzzingserverUrl}/updateReports?agent=undici`) return } console.log(`Running test case ${currentTest}/${testCount}`) ws = new WebSocket( - `${autobahnFuzzingserverUrl}/runCase?case=${currentTest}&agent=undici`, - options + `${autobahnFuzzingserverUrl}/runCase?case=${currentTest}&agent=undici` ) ws.addEventListener('message', (data) => { ws.send(data.data) @@ -38,7 +32,7 @@ function nextTest () { }) } -const ws = new WebSocket(`${autobahnFuzzingserverUrl}/getCaseCount`, options) +const ws = new WebSocket(`${autobahnFuzzingserverUrl}/getCaseCount`) ws.addEventListener('message', (data) => { testCount = parseInt(data.data) })