<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.5.10 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>

<rfc ipr="trust200902" docName="draft-damjanovic-websockets-https-rr-00" category="info">

  <front>
    <title>Advertising WebSocket support in the HTTPS resource record</title>

    <author initials="D." surname="Damjanovic" fullname="Dragana Damjanovic">
      <organization>Mozilla</organization>
      <address>
        <email>dragana.damjano@gmail.com</email>
      </address>
    </author>

    <date year="2021" month="October" day="19"/>

    <area>ART</area>
    <workgroup>HTTP</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>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 <xref target="HTTPSRR"/>.</t>



    </abstract>


    <note title="Note to Readers">


<t><em>RFC EDITOR: please remove this section before publication</em></t>

<t>Discussion of this draft takes place on the HTTP working group mailing list (ietf-http-wg@w3.org), which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/">https://lists.w3.org/Archives/Public/ietf-http-wg/</eref>.</t>

<t>Working Group information can be found at <eref target="https://httpwg.org/">https://httpwg.org/</eref>; source code and issues list for this draft can be found at <eref target="https://github.com/httpwg/http-extensions/labels/h3-websockets">https://github.com/httpwg/http-extensions/labels/h3-websockets</eref>.</t>


    </note>


  </front>

  <middle>


<section anchor="introduction"><name>Introduction</name>

<t>The mechanisms for running the WebSocket protocol over a single stream of an HTTP/2 and HTTP/3
connection are defined in <xref target="RFC8441"/> and <xref target="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 <xref target="RFC7540"/> and <xref target="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 <xref target="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.</t>

</section>
<section anchor="conventions-and-definitions"><name>Conventions and Definitions</name>

<t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL</bcp14>
NOT", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>

</section>
<section anchor="extending-https-dns-resource-record"><name>Extending HTTPS DNS resource record</name>

<t>This specification introduces the "extended-connect" SvcParamKey (see <xref target="HTTPSRR"/>) that  indicates that a
particular service endpoint supports the extended CONNECT feature defined in  <xref target="RFC8441"/>
and <xref target="WSHTTP3"/>. The presentation and wire format values for the "extended-connect"
SvcParamKey <bcp14>MUST</bcp14> be empty.  If the "extended-connect" key is present, "alpn" <bcp14>MUST</bcp14> also be
specified with at least the h2 or h3 value.</t>

</section>
<section anchor="the-client-behavior"><name>The Client Behavior</name>

<t>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.</t>

<t>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.</t>

</section>
<section anchor="security-considerations"><name>Security Considerations</name>

<t>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 <xref target="RFC8441"/>
and <xref target="WSHTTP3"/>.</t>

</section>
<section anchor="iana-considerations"><name>IANA Considerations</name>

<t>This specification adds the following entry to the Service Parameter Keys (SvcParamKeys) registry:</t>

<texttable>
      <ttcol align='left'>Number</ttcol>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Meaning</ttcol>
      <ttcol align='left'>Format Reference</ttcol>
      <c>7</c>
      <c>extended-connect</c>
      <c>Support of the extended CONNECT feature</c>
      <c>(This document) Section 3</c>
</texttable>

</section>


  </middle>

  <back>

    <references title='Normative References'>




<reference anchor='WSHTTP3'>
   <front>
      <title>Bootstrapping WebSockets with HTTP/3</title>
      <author fullname='Ryan Hamilton'>
	 <organization>Google</organization>
      </author>
      <date day='9' month='September' year='2021'/>
      <abstract>
	 <t>   The mechanism for running the WebSocket Protocol over a single stream
   of an HTTP/2 connection is equally applicable to HTTP/3, but needs to
   be separately registered.  This document describes the mechanism for
   HTTP/3.

	 </t>
      </abstract>
   </front>
   <seriesInfo name='Internet-Draft' value='draft-ietf-httpbis-h3-websockets-00'/>
   <format target='https://www.ietf.org/archive/id/draft-ietf-httpbis-h3-websockets-00.txt' type='TXT'/>
</reference>


<reference anchor='HTTPSRR'>
   <front>
      <title>Service binding and parameter specification via the DNS (DNS SVCB and HTTPS RRs)</title>
      <author fullname='Ben Schwartz'>
	 <organization>Google</organization>
      </author>
      <author fullname='Mike Bishop'>
	 <organization>Akamai Technologies</organization>
      </author>
      <author fullname='Erik Nygren'>
	 <organization>Akamai Technologies</organization>
      </author>
      <date day='12' month='October' year='2021'/>
      <abstract>
	 <t>   This document specifies the &quot;SVCB&quot; and &quot;HTTPS&quot; DNS resource record
   (RR) types to facilitate the lookup of information needed to make
   connections to network services, such as for HTTP origins.  SVCB
   records allow a service to be provided from multiple alternative
   endpoints, each with associated parameters (such as transport
   protocol configuration and keys for encrypting the TLS ClientHello).
   They also enable aliasing of apex domains, which is not possible with
   CNAME.  The HTTPS RR is a variation of SVCB for use with HTTP [HTTP].
   By providing more information to the client before it attempts to
   establish a connection, these records offer potential benefits to
   both performance and privacy.

   TO BE REMOVED: This document is being collaborated on in Github at:
   https://github.com/MikeBishop/dns-alt-svc
   (https://github.com/MikeBishop/dns-alt-svc).  The most recent working
   version of the document, open issues, etc. should all be available
   there.  The authors (gratefully) accept pull requests.

	 </t>
      </abstract>
   </front>
   <seriesInfo name='Internet-Draft' value='draft-ietf-dnsop-svcb-https-08'/>
   <format target='https://www.ietf.org/archive/id/draft-ietf-dnsop-svcb-https-08.txt' type='TXT'/>
</reference>


<reference anchor='HTTP3'>
   <front>
      <title>Hypertext Transfer Protocol Version 3 (HTTP/3)</title>
      <author fullname='Mike Bishop'>
	 <organization>Akamai</organization>
      </author>
      <date day='2' month='February' year='2021'/>
      <abstract>
	 <t>   The QUIC transport protocol has several features that are desirable
   in a transport for HTTP, such as stream multiplexing, per-stream flow
   control, and low-latency connection establishment.  This document
   describes a mapping of HTTP semantics over QUIC.  This document also
   identifies HTTP/2 features that are subsumed by QUIC, and describes
   how HTTP/2 extensions can be ported to HTTP/3.

DO NOT DEPLOY THIS VERSION OF HTTP

   DO NOT DEPLOY THIS VERSION OF HTTP/3 UNTIL IT IS IN AN RFC.  This
   version is still a work in progress.  For trial deployments, please
   use earlier versions.

Note to Readers

   Discussion of this draft takes place on the QUIC working group
   mailing list (quic@ietf.org), which is archived at
   https://mailarchive.ietf.org/arch/search/?email_list=quic.

   Working Group information can be found at https://github.com/quicwg;
   source code and issues list for this draft can be found at
   https://github.com/quicwg/base-drafts/labels/-http.

	 </t>
      </abstract>
   </front>
   <seriesInfo name='Internet-Draft' value='draft-ietf-quic-http-34'/>
   <format target='https://www.ietf.org/archive/id/draft-ietf-quic-http-34.txt' type='TXT'/>
</reference>



<reference anchor='RFC8441' target='https://www.rfc-editor.org/info/rfc8441'>
<front>
<title>Bootstrapping WebSockets with HTTP/2</title>
<author fullname='P. McManus' initials='P.' surname='McManus'><organization/></author>
<date month='September' year='2018'/>
<abstract><t>This document defines a mechanism for running the WebSocket Protocol (RFC 6455) over a single stream of an HTTP/2 connection.</t></abstract>
</front>
<seriesInfo name='RFC' value='8441'/>
<seriesInfo name='DOI' value='10.17487/RFC8441'/>
</reference>



<reference anchor='RFC7540' target='https://www.rfc-editor.org/info/rfc7540'>
<front>
<title>Hypertext Transfer Protocol Version 2 (HTTP/2)</title>
<author fullname='M. Belshe' initials='M.' surname='Belshe'><organization/></author>
<author fullname='R. Peon' initials='R.' surname='Peon'><organization/></author>
<author fullname='M. Thomson' initials='M.' role='editor' surname='Thomson'><organization/></author>
<date month='May' year='2015'/>
<abstract><t>This specification describes an optimized expression of the semantics of the Hypertext Transfer Protocol (HTTP), referred to as HTTP version 2 (HTTP/2).  HTTP/2 enables a more efficient use of network resources and a reduced perception of latency by introducing header field compression and allowing multiple concurrent exchanges on the same connection.  It also introduces unsolicited push of representations from servers to clients.</t><t>This specification is an alternative to, but does not obsolete, the HTTP/1.1 message syntax.  HTTP's existing semantics remain unchanged.</t></abstract>
</front>
<seriesInfo name='RFC' value='7540'/>
<seriesInfo name='DOI' value='10.17487/RFC7540'/>
</reference>



<reference anchor='RFC2119' target='https://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author fullname='S. Bradner' initials='S.' surname='Bradner'><organization/></author>
<date month='March' year='1997'/>
<abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>



<reference anchor='RFC8174' target='https://www.rfc-editor.org/info/rfc8174'>
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author fullname='B. Leiba' initials='B.' surname='Leiba'><organization/></author>
<date month='May' year='2017'/>
<abstract><t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='8174'/>
<seriesInfo name='DOI' value='10.17487/RFC8174'/>
</reference>




    </references>



<section numbered="false" anchor="acknowledgments"><name>Acknowledgments</name>

</section>


  </back>

<!-- ##markdown-source:
H4sIAMIob2EAA7VX7XLbNhb9j6fAqn/ijCnZsXfSqN1MVclpPBvLXkmZTKfT
yUAkJGJNEgwASlVtv0ufpU+254IQRUWpk2m7+mGTIHg/Ds499zKKIuaUy2Sf
dwbJShqnrCqW/J2cT3V8Kx23VVlq47gquEslfz2b3Uy5kVZXJpa4iLVJOizR
cSFyWEmMWLgoEfl/RaFXKo7Wcm69JRulzpU2MiY6OWGxcHKpzaYPwwvNmCpN
nztTWffs5OTFyTMmjBR9PpjM2Fqb26XRVdn33tmt3GAp6fPLwklTSBeNyCmz
ThTJe5HpAnFspGU2F8a9/1BpJ22fF5qVqs9/cjo+5hYpGbmwuNrkdPEzY6Jy
qTZ9xiPG8avzgemlKAQfNRn5h9pgVf0qnNJFn1/pX1WWCf9E5kJlHgd6rxuQ
+G5Jy91Y54wV2uR4cSXhir+bUk5nSCYadWvwlHQLj9VcAbOzFoLY7/GfTA72
J4XVZWRX8byGOWw9NPyhwqHQFmAO5JtQGIuiiIu5dUbEjrFZqiy3pYzVQsU+
T5yUMzqpYmm54Gux4U5zEUgjPTu2ZIFdfy9/cbJIZMKH1+PxxXDGF1K4ytBm
4RgcVBYPabepioKIR2/tyFcajePSGdfwAqfEzQxucHYi53rBReHT7D3DVVJf
nrFYF4WMfciVZ/MnSWv53V1A8+GhG/IvwJX3Y/rj9PuJFIk0lrGnk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