Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket server only needs to reply with a single subprotocol #2845

Merged
merged 4 commits into from
Feb 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions lib/web/websocket/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,6 @@ function establishWebSocketConnection (url, protocols, ws, onEstablish, options)
failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.')
return
}
} else if (request.headersList.contains('sec-websocket-protocol', true)) {
KhafraDev marked this conversation as resolved.
Show resolved Hide resolved
// If the server did not send a Sec-WebSocket-Protocol header but the client did,
// fail the connection.
failWebsocketConnection(ws, 'Client sent a Sec-WebSocket-Protocol header but did not receive one from the server.')
return
}

response.socket.on('data', onSocketData)
Expand Down