<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" xml:lang="en" ipr="trust200902" docName="draft-ietf-httpbis-h3-websockets-04" number="9220" submissionType="IETF" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" updates="" obsoletes="" version="3">
  <!-- xml2rfc v2v3 conversion 3.12.1 -->
  <front>
    <title>Bootstrapping WebSockets with HTTP/3</title>
    <seriesInfo name="RFC" value="9220"/>
    <author initials="R." surname="Hamilton" fullname="Ryan Hamilton">
      <organization>Google</organization>
      <address>
        <email>rch@google.com</email>
      </address>
    </author>
    <date year="2022" month="June"/>
    <area>ART</area>
    <workgroup>HTTP</workgroup>
    <keyword>extended connect</keyword>
    <keyword>42</keyword>
    <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 the
HTTP-version-specific details need to be specified. This document describes
how the mechanism is adapted for HTTP/3.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>"<xref target="RFC8441" format="title"/>" <xref target="RFC8441" format="default"/> defines an extension
to HTTP/2 <xref target="HTTP2"/> that is also useful in HTTP/3 <xref target="HTTP3"/>.
This extension makes use of an HTTP/2 setting.  <xref section="A.3" sectionFormat="of" target="HTTP3"/>
gives some guidance on what changes (if any) are appropriate when porting
settings from HTTP/2 to HTTP/3.</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 NOT</bcp14>", "<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&nbsp;14
       <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
       when, they appear in all capitals, as shown here.</t>
    </section>
    <section anchor="websockets-upgrade-over-http3">
      <name>WebSockets Upgrade over HTTP/3</name>
      <t><xref target="RFC8441"/> defines a mechanism for running the WebSocket Protocol
<xref target="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.</t>
      <t>The semantics of the pseudo-header fields and setting are identical to those
in HTTP/2 as defined in <xref target="RFC8441"/>. <xref section="A.3" sectionFormat="of" target="HTTP3"/> 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.</t>
      <t>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 <bcp14>SHOULD</bcp14> respond to the request with a 501 (Not
Implemented) status code (<xref section="15.6.2" sectionFormat="of" target="HTTP"/>). A server <bcp14>MAY</bcp14>
provide more information via a "problem details" response <xref target="RFC7807"/>.</t>
      <t>The HTTP/3 stream closure is also analogous to the TCP connection
closure of <xref target="RFC6455"/>. Orderly TCP-level closures are represented as
a FIN bit on the stream (<xref section="4.4" sectionFormat="of" target="HTTP3"/>). RST exceptions are
represented with a stream error (<xref section="8" sectionFormat="of" target="HTTP3"/>) of type
H3_REQUEST_CANCELLED (<xref section="8.1" sectionFormat="of" target="HTTP3"/>).</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This document introduces no new security considerations beyond those
discussed in <xref target="RFC8441"/>.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document registers a new setting in the "HTTP/3 Settings"
registry (<xref section="11.2.2" sectionFormat="of" target="HTTP3"/>).</t>
      <dl spacing="compact">
        <dt>
Value:  </dt>
        <dd>
          <t>0x08</t>
        </dd>
        <dt>
Setting Name:  </dt>
        <dd>
          <t>SETTINGS_ENABLE_CONNECT_PROTOCOL</t>
        </dd>
        <dt>
Default:  </dt>
        <dd>
          <t>0</t>
        </dd>
        <dt>
Status:  </dt>
        <dd>
          <t>permanent</t>
        </dd>
        <dt>
Specification:  </dt>
        <dd>
          <t>This document</t>
        </dd>
        <dt>
Change Controller:  </dt>
        <dd>
          <t>IETF</t>
        </dd>
        <dt>
Contact:  </dt>
        <dd>
          <t>HTTP Working Group (ietf-http-wg@w3.org)</t>
        </dd>
      </dl>
    </section>
  </middle>
  <back>
    <displayreference target="HTTP3" to="HTTP/3"/>
    <displayreference target="HTTP2" to="HTTP/2"/>
    <references>
      <name>Normative References</name>
<!-- [HTTP/3] draft-ietf-quic-http (RFC 9114) -->
      <reference anchor='HTTP3' target="https://www.rfc-editor.org/info/rfc9114">
        <front>
          <title>HTTP/3</title>
          <author initials='M' surname='Bishop' fullname='Mike Bishop' role="editor">
            <organization />
          </author>
          <date year='2022' month='June' />
        </front>
        <seriesInfo name="RFC" value="9114"/>
        <seriesInfo name="DOI" value="10.17487/RFC9114"/>
      </reference>
<!-- [HTTP/2] draft-ietf-httpbis-http2bis (RFC 9113) -->
      <reference anchor='HTTP2' target="https://www.rfc-editor.org/info/rfc9113">
        <front>
          <title>HTTP/2</title>
          <author initials='M' surname='Thomson' fullname='Martin Thomson' role="editor">
            <organization />
          </author>
          <author initials='C' surname='Benfield' fullname='Cory Benfield' role="editor">
            <organization />
          </author>
          <date year='2022' month='June' />
        </front>
        <seriesInfo name="RFC" value="9113"/>
        <seriesInfo name="DOI" value="10.17487/RFC9113"/>
      </reference>
<!-- [HTTP] draft-ietf-httpbis-semantics (RFC 9110) -->
      <reference anchor='HTTP' target="https://www.rfc-editor.org/info/rfc9110">
        <front>
          <title>HTTP Semantics</title>
          <author initials='R' surname='Fielding' fullname='Roy Fielding' role="editor">
            <organization />
          </author>
          <author initials='M' surname='Nottingham' fullname='Mark Nottingham' role="editor">
            <organization />
          </author>
          <author initials='J' surname='Reschke' fullname='Julian Reschke' role="editor">
            <organization />
          </author>
          <date year='2022' month='June' />
        </front>
        <seriesInfo name="STD" value="97"/>
        <seriesInfo name="RFC" value="9110"/>
        <seriesInfo name="DOI" value="10.17487/RFC9110"/>
      </reference>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8441.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6455.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7807.xml"/>
    </references>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>This document had reviews and input from many contributors in the IETF HTTP
and QUIC Working Groups, with substantive input from <contact fullname="David Schinazi"/>, <contact fullname="Martin Thomson"/>, <contact fullname="Lucas Pardue"/>, <contact fullname="Mike Bishop"/>, <contact fullname="Dragana Damjanovic"/>, <contact fullname="Mark Nottingham"/>, and <contact fullname="Julian Reschke"/>.</t>
    </section>
  </back>
</rfc>
