diff --git a/src/response.rs b/src/response.rs index caf6ad4..1f50c1b 100644 --- a/src/response.rs +++ b/src/response.rs @@ -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::().unwrap(); + assert_eq!("application/json", resp.content_type()); + } + #[test] fn content_type_with_charset() { let s = "HTTP/1.1 200 OK\r\n\