[Webkit-unassigned] [Bug 271122] WebSocket must not be established when subprotocol is not selected by the server

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 17 01:07:29 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=271122

--- Comment #1 from Ahmad Saleem <ahmad.saleem792 at gmail.com> ---
Only relevant link in spec, I can find:

https://websockets.spec.whatwg.org//#websocket-opening-handshake

Step 11 (Bullet 2) mentions `subprotocol`:

Fetch request with useParallelQueue set to true, and processResponse given response being these steps:

If response is a network error or its status is not 101, fail the WebSocket connection.

If protocols is not the empty list and extracting header list values given `Sec-WebSocket-Protocol` and response’s header list results in null, failure, or the empty byte sequence, then fail the WebSocket connection.

This is different from the check on this header defined by The WebSocket Protocol. That only covers a subprotocol not requested by the client. This covers a subprotocol requested by the client, but not acknowledged by the server.

Follow the requirements stated step 2 to step 6, inclusive, of the last set of steps in section 4.1 of The WebSocket Protocol to validate response. This either results in fail the WebSocket connection or the WebSocket connection is established.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240317/1fc37204/attachment.htm>


More information about the webkit-unassigned mailing list