Ticket #178: i178.diff
File i178.diff, 7.6 KB (added by julian.reschke@…, 12 years ago) |
---|
-
p3-payload.xml
632 632 <ttcol>Defined in...</ttcol> 633 633 634 634 <c>Content-Length</c> <c>&header-content-length;</c> 635 <c>Content-MD5</c> <c><xref target="header.content-md5"/></c>636 635 <c>Content-Range</c> <c>&header-content-range;</c> 637 636 </texttable> 638 637 </section> … … 1414 1413 </t> 1415 1414 </section> 1416 1415 1417 <section title="Content-MD5" anchor="header.content-md5">1418 <iref primary="true" item="Content-MD5 header field" x:for-anchor=""/>1419 <iref primary="true" item="Header Fields" subitem="Content-MD5" x:for-anchor=""/>1420 <x:anchor-alias value="Content-MD5"/>1421 <t>1422 The "Content-MD5" header field, as defined in <xref target="RFC1864"/>, is1423 an MD5 digest of the payload body that provides an end-to-end message1424 integrity check (MIC) of the payload body (the message-body after any1425 transfer-coding is decoded). Note that a MIC is good for1426 detecting accidental modification of the payload body in transit, but is not1427 proof against malicious attacks.1428 </t>1429 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-MD5"/>1430 <x:ref>Content-MD5</x:ref> = <base64 of 128 bit MD5 digest as per <xref target="RFC1864"/>>1431 </artwork></figure>1432 <t>1433 The Content-MD5 header field &MAY; be generated by an origin server or1434 client to function as an integrity check of the payload body. Only1435 origin servers or user agents &MAY; generate the Content-MD5 header field;1436 proxies &MUST-NOT; generate it, as this would defeat its1437 value as an end-to-end integrity check. Any recipient &MAY; check that1438 the digest value in this header field matches a corresponding digest1439 calculated on payload body as received.1440 </t>1441 <t>1442 The MD5 digest is computed based on the content of the payload body,1443 including any content-coding, but not including any transfer-coding1444 applied to the message-body because such transfer-codings might be1445 applied or removed anywhere along the request/response chain.1446 If the message is received with a transfer-coding, that encoding &MUST;1447 be decoded prior to checking the Content-MD5 value against the received1448 payload.1449 </t>1450 <t>1451 HTTP extends RFC 1864 to permit the digest to be computed for MIME1452 composite media-types (e.g., multipart/* and message/rfc822), but1453 this does not change how the digest is computed as defined in the1454 preceding paragraph.1455 </t>1456 <t>1457 There are several consequences of this. The payload for composite1458 types &MAY; contain many body-parts, each with its own MIME and HTTP1459 header fields (including Content-MD5, Content-Transfer-Encoding, and1460 Content-Encoding header fields). If a body-part has a Content-Transfer-Encoding1461 or Content-Encoding header field, it is assumed that the content1462 of the body-part has had the encoding applied, and the body-part is1463 included in the Content-MD5 digest as is — i.e., after the1464 application. The Transfer-Encoding header field is not allowed within1465 body-parts.1466 </t>1467 <t>1468 Conversion of all line breaks to CRLF &MUST-NOT; be done before1469 computing or checking the digest: the line break convention used in1470 the text actually transmitted &MUST; be left unaltered when computing1471 the digest.1472 </t>1473 <x:note>1474 <t>1475 <x:h>Note:</x:h> While the definition of Content-MD5 is exactly the same for1476 HTTP as in RFC 1864 for MIME entity-bodies, there are several ways1477 in which the application of Content-MD5 to HTTP entity-bodies1478 differs from its application to MIME entity-bodies. One is that1479 HTTP, unlike MIME, does not use Content-Transfer-Encoding, and1480 does use Transfer-Encoding and Content-Encoding. Another is that1481 HTTP more frequently uses binary content types than MIME, so it is1482 worth noting that, in such cases, the byte order used to compute1483 the digest is the transmission byte order defined for the type.1484 Lastly, HTTP allows transmission of text types with any of several1485 line break conventions and not just the canonical form using CRLF.1486 </t>1487 </x:note>1488 </section>1489 1490 1416 <section title="Content-Type" anchor="header.content-type"> 1491 1417 <iref primary="true" item="Content-Type header field" x:for-anchor=""/> 1492 1418 <iref primary="true" item="Header Fields" subitem="Content-Type" x:for-anchor=""/> … … 1568 1494 <c> 1569 1495 <xref target="header.content-location"/> 1570 1496 </c> 1571 <c>Content-MD5</c>1572 <c>http</c>1573 <c>standard</c>1574 <c>1575 <xref target="header.content-md5"/>1576 </c>1577 1497 <c>Content-Type</c> 1578 1498 <c>http</c> 1579 1499 <c>standard</c> … … 1919 1839 <x:source href="p6-cache.xml" basename="p6-cache"/> 1920 1840 </reference> 1921 1841 1922 <reference anchor="RFC1864">1923 <front>1924 <title abbrev="Content-MD5 Header Field">The Content-MD5 Header Field</title>1925 <author initials="J." surname="Myers" fullname="John G. Myers">1926 <organization>Carnegie Mellon University</organization>1927 <address><email>jgm+@cmu.edu</email></address>1928 </author>1929 <author initials="M." surname="Rose" fullname="Marshall T. Rose">1930 <organization>Dover Beach Consulting, Inc.</organization>1931 <address><email>mrose@dbc.mtview.ca.us</email></address>1932 </author>1933 <date month="October" year="1995"/>1934 </front>1935 <seriesInfo name="RFC" value="1864"/>1936 </reference>1937 1938 1842 <reference anchor="RFC1950"> 1939 1843 <front> 1940 1844 <title>ZLIB Compressed Data Format Specification version 3.3</title> … … 2371 2275 <seriesInfo name="RFC" value="5322"/> 2372 2276 </reference> 2373 2277 2278 <reference anchor="RFC6151"> 2279 <front> 2280 <title>Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms</title> 2281 <author initials="S." surname="Turner" fullname="S. Turner"/> 2282 <author initials="L." surname="Chen" fullname="L. Chen"/> 2283 <date year="2011" month="March" /> 2284 </front> 2285 <seriesInfo name="RFC" value="6151" /> 2286 </reference> 2287 2374 2288 <reference anchor='BCP97'> 2375 2289 <front> 2376 2290 <title>Handling Normative References to Standards-Track Documents</title> … … 2581 2495 (<xref target="header.fields"/>) 2582 2496 </t> 2583 2497 <t> 2498 Remove definition of Content-MD5 header field because it was inconsistently 2499 implemented with respect to partial responses, and also because of known 2500 deficiencies in the hash algorithm itself (see <xref target="RFC6151"/> for details). 2501 (<xref target="header.fields"/>) 2502 </t> 2503 <t> 2584 2504 Remove ISO-8859-1 special-casing in Accept-Charset. 2585 2505 (<xref target="header.accept-charset"/>) 2586 2506 </t> … … 2622 2542 <x:ref>Content-Language</x:ref> = *( "," OWS ) language-tag *( OWS "," [ OWS 2623 2543 language-tag ] ) 2624 2544 <x:ref>Content-Location</x:ref> = absolute-URI / partial-URI 2625 <x:ref>Content-MD5</x:ref> = <base64 of 128 bit MD5 digest as per [RFC1864]>2626 2545 <x:ref>Content-Type</x:ref> = media-type 2627 2546 2628 2547 <x:ref>MIME-Version</x:ref> = 1*DIGIT "." 1*DIGIT … … 2668 2587 ; Content-Encoding defined but not used 2669 2588 ; Content-Language defined but not used 2670 2589 ; Content-Location defined but not used 2671 ; Content-MD5 defined but not used2672 2590 ; Content-Type defined but not used 2673 2591 ; MIME-Version defined but not used 2674 2592 </artwork></figure></section> … … 3065 2983 "Default charsets for text media types" 3066 2984 </t> 3067 2985 <t> 2986 <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/178"/>: 2987 "Content-MD5 and partial responses" 2988 </t> 2989 <t> 3068 2990 <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/276"/>: 3069 2991 "untangle ABNFs for header fields" 3070 2992 </t>