Skip to content

ws: allow '+' in subprotocol names - #3656

Open
jpfr wants to merge 1 commit into
warmcat:mainfrom
jpfr:fix/ws-protocol-plus-token
Open

ws: allow '+' in subprotocol names#3656
jpfr wants to merge 1 commit into
warmcat:mainfrom
jpfr:fix/ws-protocol-plus-token

Conversation

@jpfr

@jpfr jpfr commented Aug 16, 2026

Copy link
Copy Markdown

RFC 6455 defines Sec-WebSocket-Protocol values using HTTP token syntax, where '+' is valid. It is used by registered subprotocols such as OPC UA's 'opcua+uacp'.

The LWS 5 server upgrade path parses the protocol list with the generic tokenizer. Without LWS_TOKENIZE_F_PLUS_NONTERM, it rejects names containing '+' as a malformed protocol list before the user protocol callback can run.

Keep '+' inside the token so normal vhost protocol selection can match these subprotocols.

RFC 6455 defines Sec-WebSocket-Protocol values using HTTP token syntax, where '+' is valid.  It is used by registered subprotocols such as OPC UA's 'opcua+uacp'.

The LWS 5 server upgrade path parses the protocol list with the generic tokenizer.  Without LWS_TOKENIZE_F_PLUS_NONTERM, it rejects names containing '+' as a malformed protocol list before the user protocol callback can run.

Keep '+' inside the token so normal vhost protocol selection can match these subprotocols.
@sonarqubecloud

Copy link
Copy Markdown

@lws-team
lws-team force-pushed the main branch 10 times, most recently from 591ce34 to bc69b6b Compare August 31, 2026 10:48
@lws-team
lws-team force-pushed the main branch 2 times, most recently from 106d542 to d7e586c Compare September 6, 2026 04:02
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.

2 participants