11.07.2015 Views

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MIC is good <strong>for</strong> detecting accidental modification of the entity-bodyin transit, but is not proof against malicious attacks.)Content-MD5 = "Content-MD5" ":" md5-digestmd5-digest = The Content-MD5 header field MAY be generated by an origin server orclient to function as an integrity check of the entity-body. Onlyorigin servers or clients MAY generate the Content-MD5 header field;proxies and gateways MUST NOT generate it, as this would defeat itsvalue as an end-to-end integrity check. Any recipient of the entitybody,including gateways and proxies, MAY check that the digest valuein this header field matches that of the entity-body as received.The MD5 digest is computed based on the content of the entity-body,including any content-coding that has been applied, but not includingany transfer-encoding applied to the message-body. If the message isreceived with a transfer-encoding, that encoding MUST be removedprior to checking the Content-MD5 value against the received entity.This has the result that the digest is computed on the octets of theentity-body exactly as, and in the order that, they would be sent ifno transfer-encoding were being applied.HTTP extends RFC 1864 to permit the digest to be computed <strong>for</strong> MIMEcomposite media-types (e.g., multipart/* and message/rfc822), butthis does not change how the digest is computed as defined in thepreceding paragraph.There are several consequences of this. The entity-body <strong>for</strong> compositetypes MAY contain many body-parts, each with its own MIME and HTTPheaders (including Content-MD5, Content-Transfer-Encoding, andContent-Encoding headers). If a body-part has a Content-Transfer-Encoding or Content-Encoding header, it is assumed that the contentof the body-part has had the encoding applied, and the body-part isincluded in the Content-MD5 digest as is -- i.e., after theapplication. The Transfer-Encoding header field is not allowed withinbody-parts.Conversion of all line breaks to CRLF MUST NOT be done be<strong>for</strong>ecomputing or checking the digest: the line break convention used inthe text actually transmitted MUST be left unaltered when computingthe digest.<strong>Fielding</strong>, et al. Standards Track [Page 121]RFC <strong>2616</strong> HTTP/1.1 June 1999

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!