<?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.39 (Ruby 3.4.9) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-seemann-httpbis-reset-stream-at-00" category="info" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.34.0 -->
  <front>
    <title abbrev="Reliable QUIC Stream Resets in HTTP/3">Using QUIC Stream Resets with Partial Delivery in HTTP/3</title>
    <seriesInfo name="Internet-Draft" value="draft-seemann-httpbis-reset-stream-at-00"/>
    <author fullname="Marten Seemann">
      <organization/>
      <address>
        <email>martenseemann@gmail.com</email>
      </address>
    </author>
    <date year="2026" month="June" day="29"/>
    <area>Web and Internet Transport</area>
    <workgroup>HTTP</workgroup>
    <abstract>
      <?line 27?>

<t>QUIC stream resets do not guarantee delivery of stream data sent before the
reset.  This is a problem for HTTP/3 when the correct protocol outcome is an
abrupt stream termination, but the sender still has a bounded prefix worth
delivering, such as response headers, a short diagnostic response body, or a
partial response received from an upstream host.</t>
      <t>RESET_STREAM_AT provides reliable delivery of that prefix and is already used by
WebTransport over HTTP/3 when resetting streams.  The same mechanism also fits
HTTP/3 CONNECT tunnels, intermediary failures after response commitment,
malformed decoded HTTP messages, and requests rejected before application
processing.</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/marten-seemann/draft-seemann-httpbis-reset-stream-at"/>.</t>
    </note>
  </front>
  <middle>
    <?line 42?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>HTTP/3 <xref target="HTTP3"/> uses QUIC streams to carry requests and responses.  Several
HTTP/3 errors are signaled by abruptly terminating a stream with an error code,
but a QUIC stream reset does not ensure delivery of data sent before the reset.</t>
      <t>This matters when the sender has a useful bounded prefix, but the correct HTTP/3
outcome is still a stream error.  Examples include a proxy that has received
response bytes before an upstream failure, or a server that has decoded a
malformed request and wants to send a short diagnostic response before using
H3_MESSAGE_ERROR.</t>
      <t>RESET_STREAM_AT <xref target="RESET-STREAM-AT"/> adds a Reliable Size to the reset, so stream
data up to that point is delivered reliably while the stream still terminates
abruptly.  WebTransport over HTTP/3 <xref target="WEBTRANS-HTTP3"/> already uses this
extension to ensure delivery of the prefix that associates a WebTransport stream
with its session.</t>
      <t>The following sections describe HTTP/3 cases where reliable prefix delivery is
useful while retaining the existing stream-error signal.</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="use-cases">
      <name>Use Cases</name>
      <section anchor="connect-tunnels">
        <name>CONNECT Tunnels</name>
        <t>The relay use case described in <xref target="RESET-STREAM-AT"/> directly applies to HTTP/3
CONNECT.  HTTP/3 CONNECT carries tunnel data in DATA frames after a successful
CONNECT response.  <xref target="HTTP3"/> says that TCP connection errors, including TCP
reset, are signaled as stream errors of type H3_CONNECT_ERROR.</t>
        <t>A proxy might receive bytes from the upstream TCP connection and then observe an
upstream reset.  With a plain stream reset, DATA frames containing those
upstream bytes might be lost and will not be retransmitted.  Using
RESET_STREAM_AT allows the proxy to signal H3_CONNECT_ERROR while still
delivering the upstream bytes that it has committed to forwarding.</t>
        <t>For this use case, the Reliable Size <bcp14>SHOULD</bcp14> be the end of the last committed
DATA frame carrying tunnel bytes from the upstream connection.</t>
      </section>
      <section anchor="intermediaries-after-response-commitment">
        <name>Intermediaries After Response Commitment</name>
        <t>An intermediary can translate an upstream failure into a new HTTP response only
before it sends response headers downstream.  After that, it cannot replace the
response with a new status code.</t>
        <t>If the intermediary later detects an upstream stream error, a malformed
upstream response, or another stream-local failure, RESET_STREAM_AT allows it to
terminate the stream with an appropriate HTTP/3 error code while making
reliable only the response portion it can safely identify.  That portion always
includes the committed response HEADERS frame, and can include later response
data when the intermediary understands enough of the application protocol to
choose a useful boundary.  The Reliable Size <bcp14>SHOULD</bcp14> therefore be the end of the
response HEADERS frame, or the end of a later complete HTTP/3 frame forwarded
downstream.</t>
        <t>This is mainly useful for diagnostics, logging, and clients that can consume a
partial streaming response before an error.</t>
      </section>
      <section anchor="malformed-decoded-http-messages">
        <name>Malformed Decoded HTTP Messages</name>
        <t>This use case applies after an HTTP/3 HEADERS frame has been parsed and QPACK
decompression has succeeded.  It does not apply to invalid HTTP/3 frame syntax,
invalid frame ordering, or QPACK decompression failure.  Examples of malformed
HTTP messages under <xref target="HTTP3"/> include invalid pseudo-header fields and uppercase
field names.  A detected malformed message is treated as a stream error of type
H3_MESSAGE_ERROR.</t>
        <t>RESET_STREAM_AT allows a diagnostic HTTP response to be delivered while
preserving the H3_MESSAGE_ERROR signal.  The Reliable Size <bcp14>SHOULD</bcp14> be the end of
the diagnostic response HEADERS frame, or the end of a later complete DATA frame
carrying a short diagnostic response body.</t>
        <t>The additional information can be valuable when debugging faulty or
non-conforming clients.</t>
      </section>
      <section anchor="requests-rejected-before-application-processing">
        <name>Requests Rejected Before Application Processing</name>
        <t><xref target="HTTP3"/> defines H3_REQUEST_REJECTED for requests that a server rejects without
performing application processing.  A client can treat such a request as though
it had never been sent.  H3_REQUEST_REJECTED is not used after partial or full
application processing.</t>
        <t>A server might want to preserve this retry signal while also providing a small
diagnostic response.  For example, a server that is draining, overloaded, or
unable to route a request might send a 503 or 429 response with retry
information, then terminate the stream with H3_REQUEST_REJECTED.</t>
        <t>With RESET_STREAM_AT, the Reliable Size <bcp14>SHOULD</bcp14> be the end of the diagnostic
response HEADERS frame, or the end of a later complete DATA frame carrying a
short diagnostic response body.  This is mainly useful for HTTP/3-aware clients
and debugging tools.  A generic HTTP client API might not expose both the HTTP
response and the stream error.</t>
      </section>
    </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 anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RESET-STREAM-AT">
          <front>
            <title>QUIC Stream Resets with Partial Delivery</title>
            <author fullname="Marten Seemann" initials="M." surname="Seemann">
         </author>
            <author fullname="Kazuho Oku" initials="K." surname="Oku">
              <organization>Fastly</organization>
            </author>
            <date day="26" month="June" year="2026"/>
            <abstract>
              <t>   QUIC defines a RESET_STREAM frame to abort sending on a stream.  When
   a sender resets a stream, it also stops retransmitting STREAM frames
   for this stream in the event of packet loss.  On the receiving side,
   there is no guarantee that any data sent on that stream is delivered.

   This document defines a new QUIC frame, the RESET_STREAM_AT frame,
   that allows resetting a stream, while guaranteeing delivery of stream
   data up to a certain byte offset.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-quic-reliable-stream-reset-08"/>
        </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="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>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="WEBTRANS-HTTP3">
          <front>
            <title>WebTransport over HTTP/3</title>
            <author fullname="Alan Frindell" initials="A." surname="Frindell">
              <organization>Facebook</organization>
            </author>
            <author fullname="Eric Kinnear" initials="E." surname="Kinnear">
              <organization>Apple Inc.</organization>
            </author>
            <author fullname="Victor Vasiliev" initials="V." surname="Vasiliev">
              <organization>Google</organization>
            </author>
            <date day="2" month="March" year="2026"/>
            <abstract>
              <t>   WebTransport [OVERVIEW] is a protocol framework that enables
   application clients constrained by the Web security model to
   communicate with a remote application server using a secure
   multiplexed transport.  This document describes a WebTransport
   protocol that is based on HTTP/3 [HTTP3] and provides support for
   unidirectional streams, bidirectional streams, and datagrams, all
   multiplexed within the same HTTP/3 connection.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-webtrans-http3-15"/>
        </reference>
      </references>
    </references>
    <?line 170?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA51Y7XIbtxX9j6dAmX8dUpVsdxpr0qQ0xcRqrY+Q9HgynY4H
3AXJrZcLBsCaYjV+lz5Ln6znXgD7QVFJU/0RucQC9+Occ+/FaDQSvvClvpSD
966o1vLH99cTOfdWq62caae9k/vCb+S9sr5QpbzSZfFZ24MsKvl2sbj/w8uB
UMul1Z+xxQw/qmWpT+3SWZ8pr9fGHi7xcGWEyE1WqS1syK1a+ZHTequqarTx
frcs3MjSBiPHu42UH52fi2JnL6W3tfMvzs9fn78Qrl5uC+cKU/nDDjtdTxff
i8xUTleudrxWC5j4UihsA1M/6KVUVS6vK69tpb1cWFW5nbF+IPbGflpbU++w
jmweCCFU7TfGXgo5EhJ/q7osg803CIyu5DwYzT/iU1Feyi3/Er35y5oenmVm
K0Rl7FZ5hBHbydl0Pl2M5ovZdHwzGi9g+ujqrNB+Nfq5LjI4H0Ka/Odg4DWy
6+WlnH0/eX1x8UoIimRn1w/TN4vZ+HY+iuuaTfd66clTju5LIUajkVRLbK4y
LwTnLZwkbchbbmRlvFzXCq95rWWeEGBWaWmuvJIItZdLDTO09Bst+P0zKReb
Atl3UsmdNfBkK7EkYkHuN4gdVsvMWKszT2u8yUwpTe0RLM1vVoCYrXc+nYeU
bYsKzppqKJe15x1wfq4tlhRlKTeKDlyaGs9ybKpXxYNEXv1GRPsB9qF0dba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