Content-Digest

The HTTP Content-Digest header provides a digest of the message content in an HTTP message. As such, Content-Digest is dependent on among other things Content-Encoding and Content-Range, but not dependent on, for example, HTTP/1.1's Transfer-Encoding. Content-Digest may coincide with Repr-Digest if a representation was sent in a single message.

In this setting, content refers to a particular octet representation of the selected representation of the target resource.

A client can request that a server emit a Content-Digest by issuing Want-Content-Digest.

Header type Request header, Response header, Representation header
Forbidden header name No

Syntax

Content-Digest describes an RFC8941 dictionary with its keys being names of digest algorithms and its values being the digest in bytes (or an integer digest for legacy digest algorithms).

Note: In contrast to earlier drafts of the specification, the standard-base64-encoded digest bytes are wrapped in colons (:, ASCII 0x3A) as part of the dictionary syntax.

http
Content-Digest: <digest-algorithm>=:<standard-padded-base64-digest-value>:, ...
Content-Digest: <digest-algorithm-integer-checksum>=<integer-checksum-value>, ...

Directives

For permissible digest algorithms see Repr-Digest.

Examples

Content-Digest: unixcksum=916142062
Content-Digest: md5=:+thA//8pGVGk2VYuJkFNvA==:, unixsum=26869

Specifications

Specification
Digest Fields

Browser compatibility

This header has no specification-defined browser integration ("browser compatibility" does not apply). Developers can set and get HTTP headers using fetch() in order to provide application-specific implementation behavior.

See also