Open
Description
As stated here,
The field value does not
include any leading or trailing whitespace: OWS occurring before the
first non-whitespace octet of the field value or after the last
non-whitespace octet of the field value ought to be excluded by
parsers when extracting the field value from a header field.
Here's a test case that should be passing:
#[test]
fn test_trailing_space() {
let value = HeaderValue::from_bytes("coucou \t ".as_bytes()).unwrap();
assert_eq!(value.to_str().unwrap(), "coucou");
}