URimmovable URimmovable - 23 days ago 11
HTTP Question

Is Content-MD5 field in the HTTP Response universal?

I have tried downloading files from different servers, NOT all of them respond with the Content-MD5 field in their headers.

I wanted to know if that it is the standard to HTTP response without the hash of the resource file or not?

thanks

Answer

The Content-MD5 header field MAY be generated by an origin server or client to function as an integrity check of the entity-body. Only origin servers or clients MAY generate the Content-MD5 header field; proxies and gateways MUST NOT generate it, as this would defeat its value as an end-to-end integrity check. Any recipient of the entity- body, including gateways and proxies, MAY check that the digest value in this header field matches that of the entity-body as receive

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

As of June 2014:

The Content-MD5 header field has been removed because it was inconsistently implemented with respect to partial responses.

RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content - http://tools.ietf.org/html/rfc7231 (page 92)