<?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-ietf-httpbis-unencoded-digest-05" category="std" consensus="true" submissionType="IETF" updates="9530" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.33.0 -->
  <front>
    <title abbrev="HTTP Unencoded Digest">HTTP Unencoded Digest</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-unencoded-digest-05"/>
    <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 definitions of the terms "Integrity fields" and "Integrity preference
fields" originally 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/unencoded-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 might not be
an acceptable 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 definition of terms originally defined in <xref target="DIGEST-FIELDS"/>.
"Integrity fields" is updated to also include the Unencoded-Digest field (<xref target="unencoded-digest"/>.
"Integrity preference fields" is updated Want-Unencoded-Digest field (<xref target="want-unencoded-digest"/>).</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 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>
      <t>"Integrity fields" is the collective term for <tt>Content-Digest</tt>, <tt>Repr-Digest</tt>,
and <tt>Unencoded-Digest</tt>.</t>
      <t>"Integrity preference fields" is the collective term for <tt>Want-Repr-Digest</tt>,
<tt>Want-Content-Digest</tt>, and <tt>Want-Unencoded-Digest</tt>.</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>In the following examples of <tt>Unencoded-Digest</tt> fields, the representation data
with no content codings applied is: "An unexceptional string" followed by a
line feed character (0xA).</t>
      <sourcecode type="http-message"><![CDATA[
NOTE: '\' line wrapping per RFC 8792

Unencoded-Digest: \
  sha-512=:WjyMuMD9EI/v0RoJchcevbo6lF498VyE9564OgXf+98iJptoSvb1Czo9\
  uVJu2bVU/tOv90huiMG3+YaMX1kipw==:
]]></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=:5Bv3NIx05BPnh0jMph6v1RJ5Q7kl9LKMtQxmvc9+Z7Y=:,\
  sha-512=:WjyMuMD9EI/v0RoJchcevbo6lF498VyE9564OgXf+98iJptoSvb1Czo9\
  uVJu2bVU/tOv90huiMG3+YaMX1kipw==:
]]></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" followed by a line feed character
(0xA). 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=:kwcdt3RBGcsLaj7QSz9AW8MuwJaLjOJqUU/jKixF2oU=:
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=:kwcdt3RBGcsLaj7QSz9AW8MuwJaLjOJqUU/jKixF2oU=:
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 might 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. 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. Namely, the Unencoded-Digest
field is considered sensitive information and <bcp14>SHOULD</bcp14> be omitted unless a means
of encrypting the Unencoded-Digest field is used.</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="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>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <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>
        <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 398?>

<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:
H4sIAAAAAAAAA91c63Ibx5X+30/RoX9YXgMgQZESCUVxKImSKIuSzIsVe7NV
asw0gDYHM8j0DEBISp5ln2WfbL9zuuc+lJ1sKlu7KpdEzqX79Ll+5zIeDoci
M1mkJ3Ln5dXVO3kd6zhIQh3KZ2aubbYj1HSa6vXd9wOV6XmSbifSZqEQYRLE
aon1wlTNsqHR2Wy4yLLV1NhhXrw8DPnl4d6hsPl0aaw1SZxtV3jt7PTquYjz
5VSnExFi7Yn89Ozk6vSvQoCI+0KlWk3kez2VKg7lWZzpNNaZvEpVbFdJmolN
kt7M0yRfTSRRLG70FpfCiZBDGevbTM51rFOVYUe6lMcmSFL+0a5UehOZeC5D
Y7PUTPMM54x0ONepWOs411hE1teW0hH9HnvSey/oHq4uEuIAHdtOdnfp3818
lKTzXdxbKhNNZMmX4Wb+x819uol7Kg0W1XsRqLAjd3P3BLfMWtvdd/k0MsFu
fQFaNtWrpHp1brJFPh0FydLvzv8McXwdE6/tbqSmOrK7bZEI9+YQIsn1kB+a
yM5D+YokYyfy+PD+nhAqzxZJShwGIVLO8ihyOvA6D5SV71Qa5ppv4SQqNh+Z
+xP5NErycBZBpHxTO9ZE9NIf+e8Vv0nH6K59bm409ADUdBd+kSTzqLHo8mZj
sz/O+TqvJ+IkXeLxNYQqTDyr/SaGw6FUU6iACjIhrhZaXuhVOnQaz3r3FOqq
46y4ZPDbPDXZVs6MjkILQWoJzf5FB5nMElYWGbh3BDhJuoJfrQm9JtqRxDZ4
iV+E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