Internet-Draft | Advertising WebSocket support in the HTT | October 2021 |
Damjanovic | Expires 22 April 2022 | [Page] |
This specification introduces a way to advertise the support for the extended CONNECT feature that is used for running the WebSocket protocol over a single stream of an HTTP/2 and HTTP/3 connection using HTTPS resource records [HTTPSRR].¶
RFC EDITOR: please remove this section before publication¶
Discussion of this draft takes place on the HTTP working group mailing list (ietf-http-wg@w3.org), which is archived at https://lists.w3.org/Archives/Public/ietf-http-wg/.¶
The source code and issues list for this draft can be found at https://github.com/ddragana/drafts.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 22 April 2022.¶
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
The mechanisms for running the WebSocket protocol over a single stream of an HTTP/2 and HTTP/3 connection are defined in [RFC8441] and [WSHTTP3]. For bootstrapping WebSockets from HTTP/2 and HTTP/3 extended CONNECT is used. Support for the extended CONNECT is advertised using HTTP/2 and HTTP/3 settings (see [RFC7540] and [HTTP3]). Therefore, clients need to establish a HTTP/2 or HTTP/3 connection and wait for the setting frames to be exchanged to discover whether the connection can be used for the WebSocket requests. This specification adds a way to advertise the support for the extended CONNECT using HTTPS resource record [HTTPSRR] which will eliminate the need for a HTTP/2 or HTTP/3 connection and introduce delays. The clients can skip trying a HTTP/2 or HTTP/3 connection if the support for the extended CONNECT is not advertised.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This specification introduces the "extended-connect" SvcParamKey (see [HTTPSRR]) that indicates that a particular service endpoint supports the extended CONNECT feature defined in [RFC8441] and [WSHTTP3]. The presentation and wire format values for the "extended-connect" SvcParamKey MUST be empty. If the "extended-connect" key is present, "alpn" MUST also be specified with at least the h2 or h3 value.¶
Upon receiving a HTTPS RR, a client should use the "extended-connect" SvcParamKey as an indication whether a particular service endpoint supports the extended CONNECT feature. If the key is not present the client should not try using QUIC or TCP with the alpn set to h2 for requests that need the feature, e.g. WebSocket, and should directly use HTTP/1.1.¶
If the key is present, that is a strong indication that the service endpoint supports the feature and the client should attempt using HTTP/2 or HTTP/3 protocol. Due to difficulties of deployments the client may discover that the feature, although advertised, is not supported and in this case the client should fallback to using HTTP/1.1.¶
This specification only adds a hint of whether a feature is supported or not and therefore, it does not introduce additional security considerations beyond one described in [RFC8441] and [WSHTTP3].¶
This specification adds the following entry to the Service Parameter Keys (SvcParamKeys) registry:¶
Number | Name | Meaning | Format Reference |
---|---|---|---|
7 | extended-connect | Support of the extended CONNECT feature | (This document) Section 3 |