feat: add support for the digest headers#539
feat: add support for the digest headers#539npmccallum wants to merge 1 commit intohyperium:masterfrom
Conversation
This commit adds support for the following headers: * Repr-Digest * Content-Digest * Want-ReprDigest * Want-Content-Digest These headers are defined in the following upcoming RFC: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-digest-headers-08 Signed-off-by: Nathaniel McCallum <nathaniel@profian.com>
|
@rvolosatovs FYI |
|
As written, this is incomplete. Any predefined, As is, this would fail: let h = http::header::HeaderName::from_static("want-repr-digest");
assert_eq!(h, http::header::WANT_REPR_DIGEST);with, ...which is an unfortunately misleading error message, but is due to the internal representation of the I do not speak on behalf of the crate owners, but I suspect these particular headers may not rise to the level of universal inclusion. If you would like to argue otherwise, I would humbly suggest you rebase this on top of my branch in #499, as it automates the inclusion of the |
|
Yes, my initial feeling is that we wouldn't include these header names. The included constants tend to be very common. When the referenced pull request is merged (very soon), a user can make these constants in their own code. |
|
@seanmonstar @jeddenlea I actually concur with you that these headers probably don't warrant inclusion just yet. However... We have a chicken and egg problem. In the
Thoughts? |
|
The But yes, the const constructor should be merged shortly. I have time next week for the review. |
|
@seanmonstar I had attempted this with |
|
@npmccallum There is a good chance the problem you ran into with |
|
Would be surprised if these landed in Like Jed said, you can achieve this with |
This commit adds support for the following headers:
These headers are defined in the following upcoming RFC:
https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-digest-headers-08
Signed-off-by: Nathaniel McCallum nathaniel@profian.com