Add a test case for LF line ending response headers

This commit is contained in:
Nicolas
2021-02-15 20:42:08 -03:00
committed by Martin Algesten
parent a73ff2e465
commit 1857061859

View File

@@ -646,6 +646,16 @@ mod tests {
assert_eq!("application/json", resp.content_type());
}
#[test]
fn content_type_without_cr() {
let s = "HTTP/1.1 200 OK\r\n\
Content-Type: application/json\n\
\r\n\
OK";
let resp = s.parse::<Response>().unwrap();
assert_eq!("application/json", resp.content_type());
}
#[test]
fn content_type_with_charset() {
let s = "HTTP/1.1 200 OK\r\n\