Want-Digest
The HTTP Want-Digest request header asked the server to include a Digest header containing a hash of the requested resource in the response.
Note
The Want-Digest header has been deprecated. The modern digest specification supersedes the original mechanism with two replacement headers: Want-Content-Digest for content integrity and Want-Repr-Digest for representation integrity.
Usage
The Want-Digest header was part of the original HTTP digest mechanism. A client included this header to ask the server to compute a hash of the response body using a specified algorithm and return the result in the Digest response header.
The primary use case was verifying data integrity after transmission. A client computed its own hash of the received body and compared the result against the value in the Digest header to confirm the content arrived without corruption.
The header used a comma-separated list of algorithm tokens,
each with an optional quality value (q) indicating
preference. Higher quality values signaled stronger
preference. A quality value of 0 indicated the algorithm
was not acceptable.
The modern digest specification replaced this mechanism with separate headers for content and representation digests. The Want-Content-Digest header requests a hash of the message content as transmitted (including any content encoding). The Want-Repr-Digest header requests a hash of the selected representation before content encoding. This separation resolves ambiguity in the original specification about which form of the data was hashed.
Values
digest-algorithm
An algorithm identifier such as sha-256 or sha-512.
Multiple algorithms are separated by commas.
q (quality value)
An optional quality value between 0 and 1, separated from the algorithm by a semicolon. Higher values indicate stronger preference. A value of 0 means the algorithm is explicitly rejected.
Example
A client requesting a SHA-512 digest with a fallback to SHA-256. The quality value of 0.5 for SHA-256 indicates lower preference compared to the implicit value of 1 for SHA-512.
Want-Digest: sha-512, sha-256;q=0.5
A client explicitly requesting only SHA-256.
Want-Digest: sha-256
A server responding with the Digest header after receiving the Want-Digest request. The hash is a Base64-encoded SHA-256 digest of the response body.
Request
Want-Digest: sha-256
Response
Digest: sha-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
Takeaway
The Want-Digest header requested a message digest from the server for response integrity verification. This header has been deprecated in favor of Want-Content-Digest and Want-Repr-Digest, as defined in the modern digest specification.
See also
- RFC 3230: Instance Digests in HTTP (obsoleted)
- RFC 9530: Digest Fields
- Want-Content-Digest
- Want-Repr-Digest
- Digest
- Content-Digest
- Repr-Digest
- HTTP headers