mcavage/node-restify — pull request #614 by Gnaphron (2014-05-30 01:42:45+00:00)
Title: do not compute the MD5 Hash of a partial content

RFC 1864 (https://tools.ietf.org/html/rfc1864#section-2)
"
The Content-MD5 field is generated by only an originating user agent.
Message relays and gateways are expressly forbidden from generating a
Content-MD5 field.
".

When a partial document is requested and the data are not served directly form the originator server (if the requested document is cached for example), the MD5 received in the content-md5 header is the one computed against the whole content, not the partial document MD5 check sum.

This patch ignore the content-md5 header, only if the content is partially received (HTTP Status code 206 Partial Content).