<?xml version="1.0" encoding="UTF-8"?>

<!-- [CS] updated by Chris 02/22/22 -->

<!--  draft submitted in xml v3 -->

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.5.25 (Ruby 3.0.3) -->

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" xml:lang="en" ipr="trust200902" docName="draft-ietf-httpbis-h3-websockets-04" number="0000" 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="0000"/>
    <author initials="R." surname="Hamilton" fullname="Ryan Hamilton">
      <organization>Google</organization>
      <address>
        <email>rch@google.com</email>
      </address>
    </author>
    <date year="2022" month="March"/>
    <area>ART</area>
    <workgroup>HTTP</workgroup>

    <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>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-httpbis-h3-websockets/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        HTTP Working Group mailing list (<eref target="mailto:ietf-http-wg@w3.org"/>),
        which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
        Working Group information can be found at <eref target="https://httpwg.org/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/httpwg/http-extensions/labels/h3-websockets"/>.</t>
    </note>
  </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="RFC9113"/> which is also useful in HTTP/3 <xref target="RFC9114"/>.
This extension makes use of an HTTP/2 setting.  <xref section="A.3" sectionFormat="of" target="RFC9114"/>
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 which 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 <xref target="RFC8441"/>. <xref section="A.3" sectionFormat="of" target="RFC9114"/> 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="RFC9110"/>). 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.2" sectionFormat="of" target="RFC9114"/>). RST exceptions are
represented with a stream error (<xref section="8" sectionFormat="of" target="RFC9114"/>) of type
H3_REQUEST_CANCELLED (<xref section="8.1" sectionFormat="of" target="RFC9114"/>).</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="RFC9114"/>).</t>
      <dl>
        <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>
Date:  </dt>
        <dd>
          <t>[ date of publication ]</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>
        <dt>
Notes:  </dt>
        <dd>
          <!-- -->
  </dd>
      </dl>
    </section>
  </middle>
  <back>

<displayreference target="RFC9114" to="HTTP3"/>
<displayreference target="RFC9113" to="HTTP2"/>
<displayreference target="RFC9110" to="HTTP"/>

    <references>
      <name>Normative References</name>

<!-- draft-ietf-quic-http (RFC 9114) -->
<reference anchor='RFC9114' target="https://www.rfc-editor.org/info/rfc9114">
<front>
<title>Hypertext Transfer Protocol Version 3 (HTTP/3)</title>
<author initials='M' surname='Bishop' fullname='Mike Bishop' role="editor">
<organization />
</author>
<date year='2022' month='March' />
</front>
<seriesInfo name="RFC" value="9114"/>
<seriesInfo name="DOI" value="10.17487/RFC9114"/>
</reference>

<!-- draft-ietf-httpbis-http2bis (RFC 9113) -->
<reference anchor='RFC9113' 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='March' />
</front>
<seriesInfo name="RFC" value="9113"/>
<seriesInfo name="DOI" value="10.17487/RFC9113"/>
</reference>

<!-- draft-ietf-httpbis-semantics (RFC 9110) -->
<reference anchor='RFC9110' 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='March' />
</front>
<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>
  <!-- ##markdown-source:
H4sIAJaXAmIAA5VX4XIaORL+r6fQcn/iKw824Gwcam9rCSaxr2zwGXKprdSW
S8wI0DEjTSSNCevyu+yz7JPd15oZYGKn9u6PGUvdre6vuz+1oihiXvlU9nnr
nTHeeSvyXOkl/yTnUxOvpXd8o/yKX85mtye9FktMrEUG+cSKhY+U9Ito5X0+
Vy5a9aKNnLtSLTo9Y7Hwcmnsts+dTxhTue1zbwvnu6enb0+7TFgp+nxwN2Mb
Y9dLa4q8H05ia7nFUtLnV9pLq6WPLug89iB1IfuM80Nhzv02h0ufYIR8/0B7
WF0ZcpS8c/2TE/rdLNvGLk+wlwmV9vnO/Wiz/GXTo03sCRuv9nqpct61y82T
AbbUg3Qnt8U8VfHJoQEya2Vu9qpLIFfM27HJqtPDTyS/eqmdMtqdpGIuU3fS
QI6VapFyrpBRkIDJhoTzQif3IjUaAW4lFjJh/f2Xwnjp+lwblqs+/+xNfMyd
sd7KhcPXNqOP3xgThV8ZCxwj+Mx5mdG7rdD8UmQq9UaHdUQstPpdePja5x+M
WaYybMgSPoDxyzKsUoyMaWMzCD+EDFFqekhgdNE+qJUvhYpLwHpnlVD3mdCu
oPDbpY/TN5Xsd0UdXNJexS7qvEWl6cXeFcaiKOJiTsUde8ZmK8kzGa8Qmss4
BLkttKbC8djZFT6/tQYAmpSbB2m54A4iqUQpo2ozZhac4KK26PLYaC1jgokr
x+WXQqTplqOVUCNiDiVvqg465vPCh4NC6cIyFULkchmrhYp5Ij2gdVxLmZDW
HAeWezJp89kK5tGCRSa1h6yLrZoj/SuzCTb3YUFOJCL3sEIRloe3SygylSRI
JPsbdZc1SRE8Z+x/oYBuiz8+/nD3fnh+dtZ5eoIPC6WlIyx2Zc3qaLuQDRmG
4Gal4lVwK3WGF04uipSrCsFeJdh7emqzEOTOGDp1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