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

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

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