Replace the opening handshake
02Extended CONNECT names the WebSocket service and target URI; a successful response opens this stream for WebSocket traffic.
The server’s illustrative 200 response selects chat from the offered subprotocols. No 101 or old key/accept challenge is used. Only after success does this stream carry WebSocket traffic.
Source for this drawing: RFC 8441 · Read RFC section 4 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
- Extended CONNECT
- The opted-in CONNECT form with a :protocol pseudo-header.
- Subprotocol
- An application protocol negotiated inside WebSocket, such as the illustrative chat value.
- HEADERS
- HTTP/2 frames carrying compressed field sections; the drawing shows decoded fields.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Change the handshake, not the whole connection.
- The request MUST include :protocol with value websocket. Requests bearing :protocol MUST also include :scheme and :path. :authority identifies the target resource, not an instruction to tunnel to that external host.
- For wss, :scheme MUST be https; for ws it MUST be http. Connection and Upgrade MUST NOT be included. Implementations do not perform the old Sec-WebSocket-Key / Sec-WebSocket-Accept processing.
- Origin, Sec-WebSocket-Version, subprotocol and extension fields retain their RFC6455 roles; HTTP/2 field names are lowercase. After a successful opening handshake the WebSocket state is OPEN. The example uses status 200, not 101.
The server MUST NOT create the ordinary CONNECT tunnel to the host in :authority merely because Extended CONNECT uses that name; the selected protocol service can be co-located or elsewhere. The displayed list is a decoded HEADERS field example, not literal HTTP/1 text on the wire. No extension is offered here.
Read the RFC section ↗