Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
RFC draft for revising RFC3230 under RFC 7231
<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
which is available here: -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
There has to be one entity for each item to be referenced.
An alternate method (rfc include) is described in the references. -->
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
please see -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
(Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
(using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="info" docName="draft-ietf-xml2rfc-template-06" ipr="trust200902">
<!-- category values: std, bcp, info, exp, and historic
ipr values: trust200902, noModificationTrust200902, noDerivativesTrust200902,
or pre5378Trust200902
you can add the attributes updates="NNNN" and obsoletes="NNNN"
they will automatically be output with "(if approved)" -->
<!-- ***** FRONT MATTER ***** -->
<!-- The abbreviated title is used in the page header - it is only necessary if the
full title is longer than 39 characters -->
<title abbrev="Abbreviated Title">Representation Digests in HTTP</title>
<!-- add 'role="editor"' below for the editors if appropriate -->
<!-- Another author who claims to be an editor -->
<author fullname="Roberto Polli" initials="R.P." role="editor"
<organization>Team Digitale</organization>
<!-- Reorder these if your country does things differently -->
<!-- uri and facsimile elements may also be added -->
<date year="2010" />
<!-- If the month and year are both specified and are the current ones, xml2rfc will fill
in the current day for you. If only the current year is specified, xml2rfc will fill
in the current day and month for you. If the year is not the current one, it is
necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
purpose of calculating the expiry date). With drafts it is normally sufficient to
specify just the year. -->
<!-- Meta-data Declarations -->
<workgroup>Internet Engineering Task Force</workgroup>
<!-- WG name at the upperleft corner of the doc,
IETF is fine for individual submissions.
If this element is not present, the default is "Network Working Group",
which is used by the RFC Editor as a nod to the history of the IETF. -->
<!-- Keywords will be incorporated into HTML output
files in a meta tag but they have no effect on text or nroff
output. If you submit your draft to the RFC Editor, the
keywords will be used for the search engine. -->
<xref target="RFC3230">RFC 3230</xref> defined the Digest and Want-Digest header fields for HTTP that allows the client
and server to negotiate an integrity checksum of the exchanged data.
That specification fixed some known limitations of Content-MD5 introducing
the concept of "instance".
As of today, <xref target="RFC7231">RFC 7231</xref> defines a new semantic for http
and standardize the concepts of `representation` and `selected representation`, further
obsoleting Content-MD5 and making "instance" outdated .
This document updates the Digest and Want-Digest header field definitions to align with
<xref target="RFC7231">RFC 7231</xref> concepts. Changes are semantically compatible with existing implementations and
better cover both the request and response cases.
This document obsoletes <xref
target="RFC3230">RFC 3230</xref>.
<section title="Introduction">
Although HTTP is typically layered over a reliable transport
protocol, such as TCP, this does not guarantee reliable transport of
information from sender to recipient. Various problems, including
undetected transmission errors, programming errors, corruption of
stored data, and malicious intervention can cause errors in the
transmitted information.
A common approach to the problem of data integrity in a network
protocol or distributed system, such as HTTP, is the use of digests,
checksums, or hash values. The sender computes a digest and sends it
with the data; the recipient computes a digest of the received data,
and then verifies the integrity of this data by comparing the
The Content-MD5 header field was originally introduced to provide integrity,
but HTTP/1.1<xref
target="RFC2119">RFC 7231 appendix-B</xref> obsoleted it:
The Content-MD5 header field has been removed because it was
inconsistently implemented with respect to partial responses.
The proposed solution uses the checksum of the selected representation of a resource.
This approach is more flexible and can be easily adapted to use-cases where the transferred data
does require some sort of manipulation to be considered a representation (eg. Range Requests RFC 7233).
This information can be sent:
<list style="symbols">
<t>in response to a HEAD request with the same value of the corresponding GET request;</t>
<t>alongside a 206 (Partial Content) response in Range Requests or similar mechanisms.</t>
Its value can be validated once all representation data has been collected.
Being calculated on the selected representation, the Digest is tied to the representation-data and the Content-Coding.
A given resource has thus multiple possible digests dependending on the applied Content-Codings.
<section title="Requirements Language">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
document are to be interpreted as described in <xref
target="RFC2119">RFC 2119</xref>.</t>
<section title="Goals">
The goals of this proposal are:
<list style="numbers">
<t>Digest coverage for representation data communicated via HTTP</t>
<t>Support for multiple digest algorithms</t>
<t>Negotiation of the use of digests</t>
The goals do not include:
<t> - header integrity
The digest mechanisms described here cover only representation data, and do not protect the integrity of associated
representation metadata headers or other message headers.
<t> - authentication
The digest mechanisms described here are not meant to support
authentication of the source of a digest or of a message or
anything else. These mechanisms, therefore, are not sufficient
defense against many kinds of malicious attacks.
<t> - privacy
Digest mechanisms do not provide message privacy.
<t> - authorization
The digest mechanisms described here are not meant to support
authorization or other kinds of access controls.
<section anchor="simple_list" title="Simple List">
<t>List styles: 'empty', 'symbols', 'letters', 'numbers', 'hanging',
<t><list style="symbols">
<t>First bullet</t>
<t>Second bullet</t>
</list> You can write text here as well.</t>
<section title="Figures">
<t>Figures should not exceed 69 characters wide to allow for the indent
of sections.</t>
<figure align="center" anchor="xml_happy">
<preamble>Preamble text - can be omitted or empty.</preamble>
<artwork align="left"><![CDATA[
| Use XML, be Happy :-) |
<postamble>Cross-references allowed in pre- and postamble. <xref
target="min_ref" />.</postamble>
<t>The CDATA means you don't need to escape meta-characters (especially
&lt;&nbsp;(&amp;lt;) and &amp;&nbsp;(&amp;amp;)) but is not essential.
Figures may also have a title attribute but it won't be displayed unless
there is also an anchor. White space, both horizontal and vertical, is
significant in figures even if you don't use CDATA.</t>
<!-- This PI places the pagebreak correctly (before the section title) in the text output. -->
<?rfc needLines="8" ?>
<section title="Subsections and Tables">
<section title="A Subsection">
<t>By default 3 levels of nesting show in table of contents but that
can be adjusted with the value of the "tocdepth" processing
<section title="Tables">
<t>.. are very similar to figures:</t>
<texttable anchor="table_example" title="A Very Simple Table">
<preamble>Tables use ttcol to define column headers and widths.
Every cell then has a "c" element for its content.</preamble>
<ttcol align="center">ttcol #1</ttcol>
<ttcol align="center">ttcol #2</ttcol>
<c>c #1</c>
<c>c #2</c>
<c>c #3</c>
<c>c #4</c>
<c>c #5</c>
<c>c #6</c>
<postamble>which is a very simple example.</postamble>
<section anchor="nested_lists" title="More about Lists">
<t>Lists with 'hanging labels': the list item is indented the amount of
the hangIndent: <list hangIndent="8" style="hanging">
<t hangText="short">With a label shorter than the hangIndent.</t>
<t hangText="fantastically long label">With a label longer than the
<t hangText="vspace_trick"><vspace blankLines="0" />Forces the new
item to start on a new line.</t>
<!-- It would be nice to see the next piece (12 lines) all on one page. -->
<?rfc needLines="12" ?>
<t>Simulating more than one paragraph in a list item using
&lt;vspace&gt;: <list style="letters">
<t>First, a short item.</t>
<t>Second, a longer list item.<vspace blankLines="1" /> And
something that looks like a separate pararaph..</t>
<t>Simple indented paragraph using the "empty" style: <list
hangIndent="10" style="empty">
<t>The quick, brown fox jumped over the lazy dog and lived to fool
many another hunter in the great wood in the west.</t>
<section title="Numbering Lists across Lists and Sections">
<t>Numbering items continuously although they are in separate
&lt;list&gt; elements, maybe in separate sections using the "format"
style and a "counter" variable.</t>
<t>First list: <list counter="reqs" hangIndent="4" style="format R%d">
</list> Specify the indent explicitly so that all the items line up
<t>Second list: <list counter="reqs" hangIndent="4" style="format R%d">
<section title="Where the List Numbering Continues">
<t>List continues here.</t>
<t>Third list: <list counter="reqs" hangIndent="4" style="format R%d">
</list> The end of the list.</t>
<section anchor="codeExample"
title="Example of Code or MIB Module To Be Extracted">
<preamble>The &lt;artwork&gt; element has a number of extra attributes
that can be used to substitute a more aesthetically pleasing rendition
into HTML output while continuing to use the ASCII art version in the
text and nroff outputs (see the xml2rfc README for details). It also
has a "type" attribute. This is currently ignored except in the case
'type="abnf"'. In this case the "artwork" is expected to contain a
piece of valid Augmented Backus-Naur Format (ABNF) grammar. This will
be syntax checked by xml2rfc and any errors will cause a fatal error
if the "strict" processing instruction is set to "yes". The ABNF will
also be colorized in HTML output to highlight the syntactic
components. Checking of additional "types" may be provided in future
versions of xml2rfc.</preamble>
/**** an example C program */
#include <stdio.h>
main(int argc, char *argv[])
int i;
printf("program arguments are:\n");
for (i = 0; i < argc; i++) {
printf("%d: \"%s\"\n", i, argv[i]);
} /* main */
/* end of file */
<section anchor="Acknowledgements" title="Acknowledgements">
<t>This template was derived from an initial version written by Pekka
Savola and contributed by him to the xml2rfc project.</t>
<t>This document is part of a plan to make xml2rfc indispensable <xref
<!-- Possibly a 'Contributors' section ... -->
<section anchor="IANA" title="IANA Considerations">
<t>This memo includes no request to IANA.</t>
<t>All drafts are required to have an IANA considerations section (see
<xref target="RFC5226">Guidelines for Writing an IANA Considerations Section in RFCs</xref> for a guide). If the draft does not require IANA to do
anything, the section contains an explicit statement that this is the
case (as above). If there are no requirements for IANA, the section will
be removed during conversion into an RFC by the RFC Editor.</t>
<section anchor="Security" title="Security Considerations">
<t>All drafts are required to have a security considerations section.
See <xref target="RFC3552">RFC 3552</xref> for a guide.</t>
<!-- *****BACK MATTER ***** -->
<!-- References split into informative and normative -->
<!-- There are 2 ways to insert reference entries from the citation libraries:
1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
(for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")
Both are cited textually in the same manner: by using xref elements.
If you use the PI option, xml2rfc will, by default, try to find included files in the same
directory as the including file. You can also define the XML_LIBRARY environment variable
with a value containing a set of directories to search. These can be either in the local
filing system or remote ones accessed by http (http://domain/dir/... ).-->
<references title="Normative References">
<!--?rfc include=""?-->
<reference anchor="min_ref">
<!-- the following is the minimum to make xml2rfc happy -->
<title>Minimal Reference</title>
<author initials="authInitials" surname="authSurName">
<date year="2006" />
<references title="Informative References">
<!-- Here we use entities that we defined at the beginning. -->
<!-- A reference written by by an organization not a person. -->
<reference anchor="DOMINATION"
<title>Ultimate Plan for Taking Over the World</title>
<organization>Mad Dominators, Inc.</organization>
<date year="1984" />
<section anchor="app-additional" title="Additional Stuff">
<t>This becomes an Appendix.</t>
<!-- Change Log
v00 2006-03-15 EBD Initial version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.