headers-content-md5

Crates.ioheaders-content-md5
lib.rsheaders-content-md5
version0.2.0
sourcesrc
created_at2023-06-24 19:53:19.165376
updated_at2023-12-01 19:27:51.780098
descriptiontyped Content-MD5 header
homepage
repositoryhttps://github.com/sunsided/hyperium-headers-content-md5
max_upload_size
id899112
size7,136
Markus Mayer (sunsided)

documentation

README

Content-MD5 header support for hyperium/headers

This adds the RFC1864 Content-MD5 header as a typed header:

use headers::Header;
use http::HeaderValue;
use headers_content_md5::ContentMd5;

fn it_works() {
    let value = HeaderValue::from_static("Q2hlY2sgSW50ZWdyaXR5IQ==");
    let md5 = ContentMd5::decode(&mut [&value].into_iter()).unwrap();
    
    let expected = "Check Integrity!".as_bytes().try_into().unwrap();
    assert_eq!(md5, ContentMd5(expected))
}
Commit count: 4

cargo fmt