<?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.30 (Ruby 3.4.8) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-httpbis-unencoded-digest-04" 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-04"/>
    <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>
      <t>This document updates the terms "Integrity fields" and "Integrity preference
fields" defined in RFC 9530.</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 55?>

<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 issues multiple requests to obtain partial representations
and "stitches" them back into a whole. Unfortunately, if the responses have
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"/>).</t>
      <t><tt>Unencoded-Digest</tt> can be sent in messages with and without content codings.
When there is no content coding, <tt>Unencoded-Digest</tt> acts identically to
<tt>Repr-Digest</tt>; for the same hashing algorithm the computed value would be the
same.</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;
future extensions may do so. 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. Security considerations related to ignoring
digests or validating multiple digests are presented in Sections <xref target="DIGEST-FIELDS" section="6.6" sectionFormat="bare"/> and <xref target="DIGEST-FIELDS" section="6.7" sectionFormat="bare"/> of <xref target="DIGEST-FIELDS"/> respectively.</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.  Ignored
preferences are an application-specific concern.</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;
future extensions may do so. 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 <xref section="8.4.1" sectionFormat="of" target="HTTP"/> describes content codings to operate "without loss of
information", that doesn't necessarily mean a byte-for-byte equivalence. A
content coding could perform semantically-meaningless
transformations that nevertheless result in a decoded byte sequence that does
not exactly match the original unencoded representation. In order to avoid
unintended validation failures, care is advised when selecting content codings
for use with <tt>Unencoded-Digest</tt>; that said, most registered content codings do provide
byte-for-byte equivalence and are appropriate.</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 that uses 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-9

]]></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. For
instance, an attacker that can access Unencoded-Digest values could infer
details about the unencrypted content without decrypting it if, for example, the
unencrypted content has a predictable pattern. When the "aes128gcm" content
coding is used, the security considerations in <xref section="4" sectionFormat="of" target="RFC8188"/> apply.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>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 392?>

<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>
      <t>The following people provided detailed feedback on the document: Mike Bishop,
Mallory Knodel, Roberto Polli, Rifaat Shekh-Yusef, and Martin Thomson.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA91b63LbRpb+30/Rw/yIsyEpUXfT48nItmQrkSxZkuO1d7bK
TaBJdgQCDBogTdvJs+yz7JPtd043bgRlT6amZmvXlYokXLpPn+t3Luj1eiIz
WaSHsvPi9vZKvo51HCShDuUzM9E26wg1GqV6cf/9QGV6kqSrobRZKESYBLGa
Yb0wVeOsZ3Q27k2zbD4ytpcXL/dCfrm3vSdsPpoZa00SZ6s5Xjs7uT0VcT4b
6XQoQqw9lJ+eHd+e/CYEiNgVKtVqKN/okVRxKM/iTKexzuRtqmI7T9JMLJP0
bpIm+XwoiWJxp1e4FA6F7MlYf8jkRMc6VRl2pEt5b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