Skip to content

fix(websocket): strip whitespace from Sec-WebSocket-Protocol tokens#639

Open
SAY-5 wants to merge 1 commit into
novnc:masterfrom
SAY-5:fix/websocket-protocol-whitespace
Open

fix(websocket): strip whitespace from Sec-WebSocket-Protocol tokens#639
SAY-5 wants to merge 1 commit into
novnc:masterfrom
SAY-5:fix/websocket-protocol-whitespace

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 19, 2026

When a client sends Sec-WebSocket-Protocol: foobar, gazonk (a space after the comma, as produced by Node's built-in WebSocket client), split(',') yields ' gazonk' with leading whitespace so the subprotocol match fails. Each token is now stripped before matching. Closes #632.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parsing of Sec-WebSocket-Protocol doesn't handle space after comma

1 participant