3. WebSockets Upgrade over HTTP/3
[RFC8441] defines a mechanism for running the WebSocket Protocol [RFC6455] over a single stream of an HTTP/2 connection. It defines an Extended CONNECT method that specifies a new ":protocol" pseudo-header field and new semantics for the ":path" and ":authority" pseudo-header fields. It also defines a new HTTP/2 setting sent by a server to allow the client to use Extended CONNECT.
The semantics of the pseudo-header fields and setting are identical to those in HTTP/2 as defined in [RFC8441]. Appendix A.3 of [HTTP/3] requires that HTTP/3 settings be registered separately for HTTP/3. The SETTINGS_ENABLE_CONNECT_PROTOCOL value is 0x08 (decimal 8), as in HTTP/2.
If a server advertises support for Extended CONNECT but receives an Extended CONNECT request with a ":protocol" value that is unknown or is not supported, the server SHOULD respond to the request with a 501 (Not Implemented) status code (Section 15.6.2 of [HTTP]). A server MAY provide more information via a "problem details" response [RFC7807].
The HTTP/3 stream closure is also analogous to the TCP connection closure of [RFC6455]. Orderly TCP-level closures are represented as a FIN bit on the stream (Section 4.4 of [HTTP/3]). RST exceptions are represented with a stream error (Section 8 of [HTTP/3]) of type H3_REQUEST_CANCELLED (Section 8.1 of [HTTP/3]).