-
-
Notifications
You must be signed in to change notification settings - Fork 339
Open
Labels
A-headersArea: HTTP headersArea: HTTP headersE-easyEffort: easy. Start here :DEffort: easy. Start here :DS-bugSeverity: bug. Something is wrong!Severity: bug. Something is wrong!
Description
The documentation of HeaderValue::from_str
says that:
Lines 101 to 104 in abe6512
/// If the argument contains invalid header value characters, an error is | |
/// returned. Only visible ASCII characters (32-127) are permitted. Use | |
/// `from_bytes` to create a `HeaderValue` that includes opaque octets | |
/// (128-255). |
So I would expect this function to return an error when I pass it a non-ascii utf8 string which contains byte values in the 128-255 range. However the result is success.
let x = http::header::HeaderValue::from_str("ñ");
panic!("{:?}", x);
thread 'main' panicked at 'Ok("\xc3\xb1")', src/main.rs:3:5
Metadata
Metadata
Assignees
Labels
A-headersArea: HTTP headersArea: HTTP headersE-easyEffort: easy. Start here :DEffort: easy. Start here :DS-bugSeverity: bug. Something is wrong!Severity: bug. Something is wrong!