<?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.29 (Ruby 3.4.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-httpbis-unencoded-digest-02" category="std" consensus="true" submissionType="IETF" updates="9530" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.31.0 -->
  <front>
    <title abbrev="HTTP Unencoded Digest">HTTP Unencoded Digest</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-unencoded-digest-02"/>
    <author fullname="Lucas Pardue">
      <organization>Cloudflare</organization>
      <address>
        <email>lucas@lucaspardue.com</email>
      </address>
    </author>
    <author fullname="Mike West">
      <organization>Google</organization>
      <address>
        <email>mkwst@google.com</email>
      </address>
    </author>
    <date/>
    <area>Web and Internet Transport</area>
    <workgroup>HTTP</workgroup>
    <keyword>next generation</keyword>
    <keyword>unicorn</keyword>
    <keyword>sparkling distributed ledger</keyword>
    <abstract>
      <?line 43?>

<t>The Repr-Digest and Content-Digest integrity fields are subject to HTTP content
coding considerations. There are some use cases that benefit from the
unambiguous exchange of integrity digests of unencoded representation. The
Unencoded-Digest and Want-Unencoded-Digest fields complement existing integrity
fields for this purpose.</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-unencoded-digest/"/>.
      </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/unecoded-digest"/>.</t>
    </note>
  </front>
  <middle>
    <?line 52?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>The <tt>Repr-Digest</tt> and <tt>Content-Digest</tt> integrity fields defined in
<xref target="DIGEST-FIELDS"/> are suitable for a range of use cases. However,
because the fields are subject to HTTP content coding considerations, it is
difficult to support use cases that could benefit from the exchange of integrity
digests of the unencoded representation.</t>
      <t>As a simple example, an application using HTTP might be presented with request
or response representation data that has been transparently decoded.  Attempting
to verify the integrity of the data against the <tt>Repr-Digest</tt> would first require
re-encoding that data using the same coding indicated by the Content-Encoding
header field (<xref section="8.4" sectionFormat="of" target="HTTP"/>), which is not always possible
(see <xref section="6.5" sectionFormat="of" target="DIGEST-FIELDS"/>).</t>
      <t>Although receivers could feasibly re-encode data in order to carry out
<tt>Repr-Digest</tt> validation, it might be impractical for certain kinds of
environments. For instance, browsers tend to provide built-in support for
transparent decoding but little support for encoding; while this could be done
via the use of additional libraries it would create work in JavaScript that
could contend with other activities. Even on the server side, the re-encoding of
received data might not be acceptable; some coding algorithms are optimized
towards efficient decoding at the cost of complex encoding. A Content-Encoding
field value that indicates a series of encodings adds further complexity.</t>
      <t>A more complex example involves HTTP Range Requests (<xref section="14" sectionFormat="of" target="HTTP"/>), where a client fetches multiple partial representations from
different origins and "stitches" them back into a whole. Unfortunately, if the
origins apply different content codings, the <tt>Repr-Digest</tt> field will vary by the
server's selected encoding (i.e. the Content-Encoding header field, <xref section="8.4" sectionFormat="of" target="HTTP"/>). This provides a challenge for a client - in order to verify the
integrity of the pieced-together whole it would need to remove the encoding of
each part, combine them, and then encode the result in order to compare against
one or more <tt>Repr-Digest</tt>s.</t>
      <t>The Accept-Encoding header field (<xref section="12.5.3" sectionFormat="of" target="HTTP"/>) provides the means
to indicate preferences for content codings. It is possible for an endpoint to
indicate a preference for no encoding, for example by sending the "identity"
token. However, codings often provide data compression that is advantageous.
Disabling content coding in order to simplify integrity checking is possibly an
unacceptable trade off.</t>
      <t>For a variety of reasons, decoding and re-encoding content in order to benefit
from HTTP integrity fields is not preferable. This specification defines the
Unencoded-Digest and Want-Unencoded-Digest fields to support a simpler validation
workflow in some scenarios where content coding is applied. These fields
complement the other integrity fields defined in <xref target="DIGEST-FIELDS"/>.</t>
      <t>This document updates the term "Integrity fields" defined in <xref target="DIGEST-FIELDS"/>
to also include the Unencoded-Digest field, and the term "Integrity preference
fields" defined in <xref target="DIGEST-FIELDS"/> to also include the Want-Unencoded-Digest
field.</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?>

<t>This document uses the Augmented BNF defined in <xref target="RFC5234"/> and updated by
<xref target="RFC7405"/>. This includes the rules: LF (line feed)</t>
      <t>This document uses the following terminology from <xref section="3" sectionFormat="of" target="STRUCTURED-FIELDS"/> to specify syntax and parsing: Byte Sequence,
Dictionary, and Integer.</t>
      <t>The definitions "representation", "selected representation", "representation
data", "representation metadata", and "content" in this document are to be
interpreted as described in <xref target="HTTP"/>.</t>
      <t>This document uses the line folding strategies described in <xref target="FOLDING"/>.</t>
      <t>The term "digest" is to be interpreted as described in <xref target="DIGEST-FIELDS"/>.</t>
    </section>
    <section anchor="unencoded-digest">
      <name>The Unencoded-Digest Field</name>
      <t>The <tt>Unencoded-Digest</tt> HTTP field can be used in requests and responses to
communicate digests that are calculated using a hashing algorithm applied to the
entire selected representation data with no content codings applied (<xref section="8.4.1" sectionFormat="of" target="HTTP"/>).</t>
      <t>Apart from the content coding concerns, <tt>Unencoded-Digest</tt> behaves similarly
to <tt>Repr-Digest</tt> (<xref section="3" sectionFormat="of" target="DIGEST-FIELDS"/>). In the absence of content
codings, <tt>Unencoded-Digest</tt> is identical to <tt>Repr-Digest</tt>.</t>
      <t><tt>Unencoded-Digest</tt> is a <tt>Dictionary</tt> (see <xref section="3.2" sectionFormat="of" target="STRUCTURED-FIELDS"/>)
where each:</t>
      <ul spacing="normal">
        <li>
          <t>key conveys the hashing algorithm (see <xref section="5" sectionFormat="of" target="DIGEST-FIELDS"/>) used to
compute the digest;</t>
        </li>
        <li>
          <t>value is a <tt>Byte Sequence</tt> (<xref section="3.3.5" sectionFormat="of" target="STRUCTURED-FIELDS"/>), that
conveys an encoded version of the byte output produced by the digest
calculation.  </t>
          <t>
Each Dictionary value can have zero or more Parameters (<xref section="3.1.2" sectionFormat="of" target="STRUCTURED-FIELDS"/>). This specification does not define any Parameters but
extensions <bcp14>MAY</bcp14> define them. Unknown Parameters <bcp14>MUST</bcp14> be ignored.</t>
        </li>
      </ul>
      <t>For example:</t>
      <sourcecode type="http-message"><![CDATA[
NOTE: '\' line wrapping per RFC 8792

Unencoded-Digest: \
  sha-512=:YMAam51Jz/jOATT6/zvHrLVgOYTGFy1d6GJiOHTohq4yP+pgk4vf2aCs\
  yRZOtw8MjkM7iw7yZ/WkppmM44T3qg==:
]]></sourcecode>
      <t>The <tt>Dictionary</tt> type can be used, for example, to attach multiple digests
calculated using different hashing algorithms in order to support a population
of endpoints with different or evolving capabilities. Such an approach could
support transitions away from weaker algorithms (see
<xref section="6.6" sectionFormat="of" target="DIGEST-FIELDS"/>).</t>
      <sourcecode type="http-message"><![CDATA[
NOTE: '\' line wrapping per RFC 8792

Unencoded-Digest: \
  sha-256=:d435Qo+nKZ+gLcUHn7GQtQ72hiBVAgqoLsZnZPiTGPk=:,\
  sha-512=:YMAam51Jz/jOATT6/zvHrLVgOYTGFy1d6GJiOHTohq4yP+pgk4vf2aCs\
  yRZOtw8MjkM7iw7yZ/WkppmM44T3qg==:
]]></sourcecode>
      <t>A recipient <bcp14>MAY</bcp14> ignore any or all digests. Application-specific behavior or
local policy <bcp14>MAY</bcp14> set additional constraints on the processing and validation
practices of the conveyed digests. The security considerations cover some of
the issues related to ignoring digests (see <xref section="6.6" sectionFormat="of" target="DIGEST-FIELDS"/>)
and validating multiple digests (see <xref section="6.7" sectionFormat="of" target="DIGEST-FIELDS"/>).</t>
      <t>A sender <bcp14>MAY</bcp14> send a digest without knowing whether the recipient supports a
given hashing algorithm. A sender <bcp14>MAY</bcp14> send a digest if it knows the recipient
will ignore it.</t>
      <t><tt>Unencoded-Digest</tt> can be sent in a trailer section. In this case,
<tt>Unencoded-Digest</tt> <bcp14>MAY</bcp14> be merged into the header section; see <xref section="6.5.1" sectionFormat="of" target="HTTP"/>.</t>
    </section>
    <section anchor="want-unencoded-digest">
      <name>The Want-Unencoded-Digest Field</name>
      <t><tt>Want-Unencoded-Digest</tt> is an integrity preference field; see <xref section="4" sectionFormat="of" target="DIGEST-FIELDS"/>. It indicates that the sender would like to receive (via the
<tt>Unencoded-Digest</tt> field) a representation digest on messages associated with the
request URI and representation metadata where no content coding is applied.</t>
      <t>If <tt>Want-Unencoded-Digest</tt> is used in a response, it indicates that the server
would like the client to provide the <tt>Unencoded-Digest</tt> field on future requests.</t>
      <t><tt>Want-Unencoded-Digest</tt> is only a hint. The receiver of the field can ignore it
and send an <tt>Unencoded-Digest</tt> field using any algorithm or omit the field
entirely. It is not a protocol error if preferences are ignored. Applications
that use <tt>Unencoded-Digest</tt> and <tt>Want-Unencoded-Digest</tt> can define expectations
or constraints that operate in addition to this specification.</t>
      <t><tt>Want-Unencoded-Digest</tt> is of type <tt>Dictionary</tt> where each:</t>
      <ul spacing="normal">
        <li>
          <t>key conveys the hashing algorithm;</t>
        </li>
        <li>
          <t>value is an <tt>Integer</tt> (<xref section="3.3.1" sectionFormat="of" target="STRUCTURED-FIELDS"/>) that conveys an
ascending, relative, weighted preference. It must be in the range 0 to 10
inclusive. 1 is the least preferred, 10 is the most preferred, and a value of
0 means "not acceptable".  </t>
          <t>
Each Dictionary value can have zero or more Parameters (<xref section="3.1.2" sectionFormat="of" target="STRUCTURED-FIELDS"/>). This specification does not define any Parameters but
extensions <bcp14>MAY</bcp14> define them. Unknown Parameters <bcp14>MUST</bcp14> be ignored.</t>
        </li>
      </ul>
      <t>Examples:</t>
      <sourcecode type="http-message"><![CDATA[
Want-Unencoded-Digest: sha-256=1
Want-Unencoded-Digest: sha-512=3, sha-256=10, unixsum=0
]]></sourcecode>
    </section>
    <section anchor="encoding-and-unencoded">
      <name>Messages containing both Unencoded-Digest and Content-Encoding</name>
      <t>Digests delivered through <tt>Unencoded-Digest</tt> apply to the unencoded
representation. If a message is received with content codings, a recipient needs
to decode the message in order to calculate the digest that can subsequently be
used for validation. If multiple content codings are applied, the recipient
needs to decode all encodings in order before validation.</t>
      <t>Since the digest is calculated on unencoded representation bytes, validation of
a message with content codings (as described above) can only succeed where the
decoded output produces the same byte sequence as the input. While many
registered content codings behave this way, there is no requirement for them to
do so and it remains a possibility that decoding could produce a
different byte sequence. In order to avoid unintended validation failures, care
is advised when selecting content coding for use with <tt>Unencoded-Digest</tt>.</t>
    </section>
    <section anchor="integrity-fields-are-complementary">
      <name>Integrity Fields are Complementary</name>
      <t>Integrity fields can be used in combination to address different and
complementary needs, particularly the cases described in <xref target="introduction"/>.</t>
      <t>In the following examples, the selected representation data with no content
codings applied is: "An unexceptional string" following by an LF. For
presentation purposes, the response content is displayed as a sequence of
hex-encoded bytes because it contains non-printable characters.</t>
      <t>The first example demonstrates a request that uses content negotiation.</t>
      <figure>
        <name>GET request with content negotiation</name>
        <sourcecode type="http-message"><![CDATA[
GET /boringstring HTTP/1.1
Host: example.org
Accept-Encoding: gzip

]]></sourcecode>
      </figure>
      <t>The server responds with the full GZIP-encoded representation. The <tt>Repr-Digest</tt>
and <tt>Unencoded-Digest</tt> therefore differ.</t>
      <figure>
        <name>GET response with GZIP content coding</name>
        <sourcecode type="http-message"><![CDATA[
NOTE: '\' line wrapping per RFC 8792

HTTP/1.1 200 OK
Content-Type: text/plain
Content-Encoding: gzip
Repr-Digest: \
  sha-256=:XyjvEuFb1P5rqc2le3vQm7M96DwZhvmOwqHLu2xVpY4=:
Unencoded-Digest: \
  sha-256=:5Bv3NIx05BPnh0jMph6v1RJ5Q7kl9LKMtQxmvc9+Z7Y=:

1f 8b 08 00 79 1f 08 64 00 ff
73 cc 53 28 cd 4b ad 48 4e 2d
28 c9 cc cf 4b cc 51 28 2e 29
ca cc 4b e7 02 00 7e af 07 44
18 00 00 00

]]></sourcecode>
      </figure>
      <t>The second example demonstrates a range request with content negotiation.</t>
      <figure>
        <name>Range request with content negotiation</name>
        <sourcecode type="http-message"><![CDATA[
GET /boringstring HTTP/1.1
Host: example.org
Accept-Encoding: gzip
Range: bytes=0-10

]]></sourcecode>
      </figure>
      <t>The server responds with a 206 (Partial Content) response using GZIP content
coding, it has three different Integrity fields. The <tt>Content-Digest</tt> relates to
the response content that can be used to validate the integrity of the
received part. <tt>Repr-Digest</tt> and <tt>Unencoded-Digest</tt> can be used later once the
entire object is reconstructed. The choice of which to use is left to the
application that would consider a range of factors outside the scope of this
document.</t>
      <figure>
        <name>Partial response with GZIP content coding</name>
        <sourcecode type="http-message"><![CDATA[
NOTE: '\' line wrapping per RFC 8792

HTTP/1.1 206 Partial Content
Content-Type: text/plain
Content-Encoding: gzip
Content-Range: bytes 0-9/44
Content-Digest: \
  sha-256=:SotB7Pa5A7iHSBdh9mg1Ev/ktAzrxU4Z8ldcCIUyfI4=:
Repr-Digest: \
  sha-256=:XyjvEuFb1P5rqc2le3vQm7M96DwZhvmOwqHLu2xVpY4=:
Unencoded-Digest: \
  sha-256=:5Bv3NIx05BPnh0jMph6v1RJ5Q7kl9LKMtQxmvc9+Z7Y=:

1f 8b 08 00 79 1f 08 64 00 ff
]]></sourcecode>
      </figure>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>All the same considerations documented in <xref target="DIGEST-FIELDS"/> apply.</t>
      <t>This document introduces a further consideration related to the process of
validation when an HTTP message contains both Content-Encoding and
Unencoded-Digest (<xref target="encoding-and-unencoded"/>). In order to validate the
Unencoded-Digest, encoded content needs to be decoded. This provides an
opportunity for an attacker to direct malicious data into a decoder. One
possible mitigation would be to also provide a Content-Digest or Repr-Digest in
the message, allowing for validation of the received bytes before further
processing. An attacker that can substitute various parts of an HTTP message
presents several risks, Sections <xref target="DIGEST-FIELDS" section="6.1" sectionFormat="bare"/>, <xref target="DIGEST-FIELDS" section="6.2" sectionFormat="bare"/> and <xref target="DIGEST-FIELDS" section="6.3" sectionFormat="bare"/> of <xref target="DIGEST-FIELDS"/>
describe relevant considerations and mitigations.</t>
      <t>A content coding may provide encryption capabilities, for example "aes128gcm"
(<xref target="RFC8188"/>). Using Unencoded-Digest with such content codings can leak
information about the original data because header fields are visible to anyone
who can read the HTTP message. This could be used as a side channel.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>Should this document be adopted and achieve working group consensus, IANA is
asked to update the "Hypertext Transfer Protocol (HTTP) Field Name Registry"
<xref target="HTTP"/> as shown in the table below:</t>
      <table anchor="iana-field-name-table">
        <name>Hypertext Transfer Protocol (HTTP) Field Name Registry Update</name>
        <thead>
          <tr>
            <th align="left">Field Name</th>
            <th align="left">Status</th>
            <th align="left">Structured Type</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">Unencoded-Digest</td>
            <td align="left">permanent</td>
            <td align="left">Dictionary</td>
            <td align="left">
              <xref target="unencoded-digest"/> of this document</td>
          </tr>
          <tr>
            <td align="left">Want-Unencoded-Digest</td>
            <td align="left">permanent</td>
            <td align="left">Dictionary</td>
            <td align="left">
              <xref target="want-unencoded-digest"/> of this document</td>
          </tr>
        </tbody>
      </table>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="DIGEST-FIELDS">
          <front>
            <title>Digest Fields</title>
            <author fullname="R. Polli" initials="R." surname="Polli"/>
            <author fullname="L. Pardue" initials="L." surname="Pardue"/>
            <date month="February" year="2024"/>
            <abstract>
              <t>This document defines HTTP fields that support integrity digests. The Content-Digest field can be used for the integrity of HTTP message content. The Repr-Digest field can be used for the integrity of HTTP representations. Want-Content-Digest and Want-Repr-Digest can be used to indicate a sender's interest and preferences for receiving the respective Integrity fields.</t>
              <t>This document obsoletes RFC 3230 and the Digest and Want-Digest HTTP fields.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9530"/>
          <seriesInfo name="DOI" value="10.17487/RFC9530"/>
        </reference>
        <reference anchor="HTTP">
          <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="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="RFC5234">
          <front>
            <title>Augmented BNF for Syntax Specifications: ABNF</title>
            <author fullname="D. Crocker" initials="D." role="editor" surname="Crocker"/>
            <author fullname="P. Overell" initials="P." surname="Overell"/>
            <date month="January" year="2008"/>
            <abstract>
              <t>Internet technical specifications often need to define a formal syntax. Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications. The current specification documents ABNF. It balances compactness and simplicity with reasonable representational power. The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value ranges. This specification also supplies additional rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="68"/>
          <seriesInfo name="RFC" value="5234"/>
          <seriesInfo name="DOI" value="10.17487/RFC5234"/>
        </reference>
        <reference anchor="RFC7405">
          <front>
            <title>Case-Sensitive String Support in ABNF</title>
            <author fullname="P. Kyzivat" initials="P." surname="Kyzivat"/>
            <date month="December" year="2014"/>
            <abstract>
              <t>This document extends the base definition of ABNF (Augmented Backus-Naur Form) to include a way to specify US-ASCII string literals that are matched in a case-sensitive manner.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7405"/>
          <seriesInfo name="DOI" value="10.17487/RFC7405"/>
        </reference>
        <reference anchor="STRUCTURED-FIELDS">
          <front>
            <title>Structured Field Values for HTTP</title>
            <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
            <author fullname="P-H. Kamp" surname="P-H. Kamp"/>
            <date month="September" year="2024"/>
            <abstract>
              <t>This document describes a set of data types and associated algorithms that are intended to make it easier and safer to define and handle HTTP header and trailer fields, known as "Structured Fields", "Structured Headers", or "Structured Trailers". It is intended for use by specifications of new HTTP fields.</t>
              <t>This document obsoletes RFC 8941.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9651"/>
          <seriesInfo name="DOI" value="10.17487/RFC9651"/>
        </reference>
        <reference anchor="FOLDING">
          <front>
            <title>Handling Long Lines in Content of Internet-Drafts and RFCs</title>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <author fullname="E. Auerswald" initials="E." surname="Auerswald"/>
            <author fullname="A. Farrel" initials="A." surname="Farrel"/>
            <author fullname="Q. Wu" initials="Q." surname="Wu"/>
            <date month="June" year="2020"/>
            <abstract>
              <t>This document defines two strategies for handling long lines in width-bounded text content. One strategy, called the "single backslash" strategy, is based on the historical use of a single backslash ('\') character to indicate where line-folding has occurred, with the continuation occurring with the first character that is not a space character (' ') on the next line. The second strategy, called the "double backslash" strategy, extends the first strategy by adding a second backslash character to identify where the continuation begins and is thereby able to handle cases not supported by the first strategy. Both strategies use a self-describing header enabling automated reconstitution of the original content.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8792"/>
          <seriesInfo name="DOI" value="10.17487/RFC8792"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC8188">
          <front>
            <title>Encrypted Content-Encoding for HTTP</title>
            <author fullname="M. Thomson" initials="M." surname="Thomson"/>
            <date month="June" year="2017"/>
            <abstract>
              <t>This memo introduces a content coding for HTTP that allows message payloads to be encrypted.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8188"/>
          <seriesInfo name="DOI" value="10.17487/RFC8188"/>
        </reference>
      </references>
    </references>
    <?line 377?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>Early drafts of <xref target="DIGEST-FIELDS"/> included a mechanism to support the exchange
of digests where no content coding is applied, which was removed before
publication. While the design here is different, it is motivated by discussion
of the previous design in the HTTP WG. The motivating use cases still mostly
apply identically.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA91b6XIbR5L+X09Rhn9YWgMgwVvwaGxIPESbFCke1ko7G6FC
dwEosw+oqxsgJNnPss8yTzZ5VF/opmQ7Zh2xq3CYZB9ZVVmZX36Zld3r9URq
0kAPZefFzc2lvI105MW+9uWhmWqbdoQajxO9ePi+p1I9jZPVUNrUF8KPvUiF
IM9P1CTtGZ1OerM0nY+N7WX5yz2fXu5tbgmbjUNjrYmjdDWH106Pbo5FlIVj
nQyFD7KH8uPh6OboVyFgEttCJVoN5Ws9liry5WmU6iTSqbxJVGTncZKKZZzc
TZM4mw8lzljc6RVc8odC9mSk71M51ZFOVAoj4qUsMl6c0K92rpK7wERT6Rub
JmacpbDOQPtTnYiFjjINQmRVtpQ86dcwJr53gvfg6ixGDeCy7XBjA38up/04
mW7AvVCZYCgLvfSW0x+W23gT7qnEm5XvBTAL2+ebGyO4ZRbablxm48B4G1UB
KDbR87h8dWrSWTbue3HoRqcfPVi+jlDXdiNQYx3YDdiS6o4IfrEHO5LpHj0z
lOvbJrI5bowdyie725tCqCydxQkqGOYh5SQLAjaBs8xTVl6qxM803YKFqMh8
IOUP5fMgzvxJADtKNzVrJsCXfqD/z+lNXEVT9rm502AGMJum4JM4ngY1oeHd
0qY/TOk6yRNRnITw+AL2VJhoUvlL9Ho9qcZgAcpLhbiZaXml50mPDZ7M7jlY
q47S/JKBv6aJSVdyYnTgW9hHLcGwf9FeKtOYbEV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