Compute a content digest
01A digest is a hash value calculated from bytes. Content-Digest describes the actual content of this HTTP message, not its header fields.
This application chooses validation. Changing world to World changes the computed digest, which no longer equals the original conveyed digest.
Source for this drawing: RFC 9530 · Read RFC section 2 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
RFC 9530 obsoletes RFC3230 and the Digest/Want-Digest fields. Content-Digest explicitly covers message content; Repr-Digest uses selected representation data, with Structured Fields serialization. This is not a rename that preserves all wire syntax.
Read the updated RFC section ↗The field is a Structured Fields Dictionary: an algorithm key maps to a Byte Sequence, displayed as Base64 between colons. It is not a hex digest or Base64url value.
- The field is a Structured Fields Dictionary: an algorithm key maps to a Byte Sequence, displayed as Base64 between colons. It is not a hex digest or Base64url value.
- Spaces, character encoding and the final line feed are bytes too. These fields provide no JSON canonicalization algorithm.
- A recipient MAY ignore any or all digests. A local application can choose to validate; a mismatch is not a universal requirement to return a particular HTTP error.
SHA means Secure Hash Algorithm. This example uses SHA-256; a digest field is not encryption, an identity check or a full-message signature. The comparison helper is a bounded teaching model, not a cryptographic implementation.
Read the RFC section ↗