<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.5 (Ruby 3.2.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-kazuho-httpbis-http3-on-streams-00" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.19.2 -->
  <front>
    <title>HTTP/3 on Streams</title>
    <seriesInfo name="Internet-Draft" value="draft-kazuho-httpbis-http3-on-streams-00"/>
    <author fullname="Kazuho Oku">
      <organization>Fastly</organization>
      <address>
        <email>kazuhooku@gmail.com</email>
      </address>
    </author>
    <author fullname="Lucas Pardue">
      <organization>Cloudflare</organization>
      <address>
        <email>lucas@lucaspardue.com</email>
      </address>
    </author>
    <date year="2024" month="February" day="16"/>
    <workgroup>httpbis</workgroup>
    <keyword>internet-draft</keyword>
    <abstract>
      <?line 23?>

<t>This document specifies how to use HTTP/3 on top of bi-directional,
byte-oriented streams such as TLS over TCP.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Discussion of this document 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/"/>.</t>
      <t>Source for this draft and an issue tracker can be found at
    <eref target="https://github.com/kazuho/draft-kazuho-httpbis-http3-on-streams"/>.</t>
    </note>
  </front>
  <middle>
    <?line 29?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>As of 2023, HTTP/2 <xref target="HTTP2"/> remains the most widely used version of
HTTP across the Internet, although the adoption rate of HTTP/3
<xref target="HTTP3"/> is increasing rapidly.</t>
      <t>HTTP/3 has several advantages over HTTP/2, primarily due to its use of QUIC
<xref target="QUIC"/> as the transport layer protocol, which provides features like
stream multiplexing without head-of-line blocking and low-latency connection
establishment.</t>
      <t>However, given that QUIC's availability and accessibility are not as universal
as TCP's, a complete migration of all HTTP/2 traffic to QUIC-based HTTP/3 seems
unlikely.</t>
      <t>This situation necessitates HTTP deployments to support both transport protocols
and their respective HTTP versions for the foreseeable future.</t>
      <t>Maintaining dual support is costly, as the two protocols differ in many aspects
such as wire-encoding, flow control and stream multiplexing machinery, and HTTP
header compression. Extensions operating at the HTTP wire encoding layer must
be developed and implemented for both HTTP/2 and HTTP/3, and both protocol
stacks require ongoing maintenance to address bugs, performance issues, and
vulnerabilities.</t>
      <t>To address this redundancy, this specification defines the method of running
HTTP/3 over TCP, utilizing QUIC on Streams
<xref target="QUIC-ON-STREAMS"/> as the basis. QUIC on
Streams, acting as a polyfill of QUIC atop bi-directional byte streams, enables
the operation of HTTP/3 over TCP without any modifications.</t>
      <t>Consequently, design, implementation, and maintenance efforts can concentrate on
a single HTTP version: 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 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="the-protocol">
      <name>The Protocol</name>
      <t>HTTP/3 functions over QUIC version 1, employing the set of operations (i.e.,
API) defined in Section <xref target="QUIC" section="2.4" sectionFormat="bare"/> and Section <xref target="QUIC" section="5.3" sectionFormat="bare"/> of <xref target="QUIC"/>. Conversely, HTTP/3 on
Streams utilizes the same set of operations but functions over QUIC on Streams
instead.</t>
    </section>
    <section anchor="starting-http3-on-streams">
      <name>Starting HTTP/3 on Streams</name>
      <t>HTTP/3 on Streams can be used for “http” and “https” URI schemes defined in
<xref section="4.2" sectionFormat="of" target="HTTP-SEMANTICS"/> with the same default port numbers as HTTP/1.1
<xref target="HTTP1"/>.</t>
      <t>When starting HTTP/3 on Streams for “https” URIs, clients use the TLS
<xref target="TLS13"/> with the ALPN <xref target="ALPN"/> extension: “h3s”.</t>
      <t>Also, clients may learn that a particular server supports HTTP/3 on Streams by
other means. A client that knows that a server supports HTTP/3 on Streams can
establish a TCP connection and start exchanging HTTP/3 frames using QUIC on
Streams.</t>
      <t>The latter is the only way to discover HTTP/3 on Streams for “http” URIs.</t>
      <t>When used in cleartext, servers can determine if or not the client is speaking
HTTP/3 on Streams by comparing the first eight bytes to the encoded form of the
QS_TRANSPORT_PARAMETERS frame type (Section 4.2 of <xref target="QUIC-ON-STREAMS"/>).</t>
    </section>
    <section anchor="support-for-extended-connect">
      <name>Support for Extended CONNECT</name>
      <t>Servers speaking HTTP/3 on Streams <bcp14>MUST</bcp14> implement the Extended CONNECT scheme
defined in <xref target="EXT-CONNECT3"/>.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>TODO Security</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="HTTP-SEMANTICS">
          <front>
            <title>HTTP Semantics</title>
            <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
            <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
            <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
            <date month="June" year="2022"/>
            <abstract>
              <t>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of the protocol that are shared by all versions. In this definition are core protocol elements, extensibility mechanisms, and the "http" and "https" Uniform Resource Identifier (URI) schemes.</t>
              <t>This document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="97"/>
          <seriesInfo name="RFC" value="9110"/>
          <seriesInfo name="DOI" value="10.17487/RFC9110"/>
        </reference>
        <reference anchor="HTTP3">
          <front>
            <title>HTTP/3</title>
            <author fullname="M. Bishop" initials="M." role="editor" surname="Bishop"/>
            <date month="June" year="2022"/>
            <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.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9114"/>
          <seriesInfo name="DOI" value="10.17487/RFC9114"/>
        </reference>
        <reference anchor="QUIC-ON-STREAMS">
          <front>
            <title>QUIC on Streams</title>
            <author fullname="Kazuho Oku" initials="K." surname="Oku">
              <organization>Fastly</organization>
            </author>
            <author fullname="Lucas Pardue" initials="L." surname="Pardue">
              <organization>Cloudflare</organization>
            </author>
            <date day="16" month="February" year="2024"/>
            <abstract>
              <t>   This document specifies a polyfill of QUIC version 1 that runs on top
   of bi-directional streams such as TLS.

Discussion Venues

   This note is to be removed before publishing as an RFC.

   Discussion of this document takes place on the QUIC Working Group
   mailing list (quic@ietf.org), which is archived at
   https://mailarchive.ietf.org/arch/browse/quic/.

   Source for this draft and an issue tracker can be found at
   https://github.com/kazuho/draft-kazuho-quic-quic-on-streams.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-kazuho-quic-quic-on-streams-00"/>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <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">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <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>
        <reference anchor="HTTP1">
          <front>
            <title>HTTP/1.1</title>
            <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
            <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
            <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
            <date month="June" year="2022"/>
            <abstract>
              <t>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document specifies the HTTP/1.1 message syntax, message parsing, connection management, and related security concerns.</t>
              <t>This document obsoletes portions of RFC 7230.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="99"/>
          <seriesInfo name="RFC" value="9112"/>
          <seriesInfo name="DOI" value="10.17487/RFC9112"/>
        </reference>
        <reference anchor="TLS13">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <date month="August" year="2018"/>
            <abstract>
              <t>This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t>This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>
        <reference anchor="ALPN">
          <front>
            <title>Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension</title>
            <author fullname="S. Friedl" initials="S." surname="Friedl"/>
            <author fullname="A. Popov" initials="A." surname="Popov"/>
            <author fullname="A. Langley" initials="A." surname="Langley"/>
            <author fullname="E. Stephan" initials="E." surname="Stephan"/>
            <date month="July" year="2014"/>
            <abstract>
              <t>This document describes a Transport Layer Security (TLS) extension for application-layer protocol negotiation within the TLS handshake. For instances in which multiple application protocols are supported on the same TCP or UDP port, this extension allows the application layer to negotiate which protocol will be used within the TLS connection.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7301"/>
          <seriesInfo name="DOI" value="10.17487/RFC7301"/>
        </reference>
        <reference anchor="EXT-CONNECT3">
          <front>
            <title>Bootstrapping WebSockets with HTTP/3</title>
            <author fullname="R. Hamilton" initials="R." surname="Hamilton"/>
            <date month="June" year="2022"/>
            <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>
          <seriesInfo name="RFC" value="9220"/>
          <seriesInfo name="DOI" value="10.17487/RFC9220"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="HTTP2">
          <front>
            <title>HTTP/2</title>
            <author fullname="M. Thomson" initials="M." role="editor" surname="Thomson"/>
            <author fullname="C. Benfield" initials="C." role="editor" surname="Benfield"/>
            <date month="June" year="2022"/>
            <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 latency by introducing field compression and allowing multiple concurrent exchanges on the same connection.</t>
              <t>This document obsoletes RFCs 7540 and 8740.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9113"/>
          <seriesInfo name="DOI" value="10.17487/RFC9113"/>
        </reference>
        <reference anchor="QUIC">
          <front>
            <title>QUIC: A UDP-Based Multiplexed and Secure Transport</title>
            <author fullname="J. Iyengar" initials="J." role="editor" surname="Iyengar"/>
            <author fullname="M. Thomson" initials="M." role="editor" surname="Thomson"/>
            <date month="May" year="2021"/>
            <abstract>
              <t>This document defines the core of the QUIC transport protocol. QUIC provides applications with flow-controlled streams for structured communication, low-latency connection establishment, and network path migration. QUIC includes security measures that ensure confidentiality, integrity, and availability in a range of deployment circumstances. Accompanying documents describe the integration of TLS for key negotiation, loss detection, and an exemplary congestion control algorithm.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9000"/>
          <seriesInfo name="DOI" value="10.17487/RFC9000"/>
        </reference>
      </references>
    </references>
    <?line 134?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA4VX627jNhb+z6fguD/aLizXdrLtjNHp1Ou4mGCT2I092C2K
YkBLlE1EIrUkFdcTBOiDdIF9ln2UPsl+h5R8SVJsgFgSRZ7Ld75zUZIkzCtf
yBHvvF8u51+dcaP5wlspStdhmUm1KPEysyL3yZ34VG9MsvG+WikXrmeJ0YmL
+5N+n6XCy7WxuxF3PmPb9Yg3u5mq7Ih7Wzs/7Pff9IfsTu62xmYjrrSXVkuf
BC3MeaGzj6IwGop30rFKjfjP3qRd7oyFqtzhblfSzS9M1H5j7IgljOMvr4si
Wvz3YCuf3dXhhbFrodUn4ZXRI/6DcL7YhReyFKoY8eiauau/X9NCLzXlM5FX
dSocnwub1f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