From 23ac1bfe82a268aa15ec4ccda2c45b61d1ea1b9a Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 6 Feb 2017 13:37:02 -0800 Subject: [PATCH] test(http): test Uri parse errors propagate --- src/http/h1/parse.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/http/h1/parse.rs b/src/http/h1/parse.rs index 814eab67..f59d64ef 100644 --- a/src/http/h1/parse.rs +++ b/src/http/h1/parse.rs @@ -282,6 +282,11 @@ mod tests { parse::(&raw).unwrap(); } + #[test] + fn test_parse_request_errors() { + let raw = MemBuf::from(b"GET htt:p// HTTP/1.1\r\nHost: hyper.rs\r\n\r\n".to_vec()); + parse::(&raw).unwrap_err(); + } #[test] fn test_parse_raw_status() { let raw = MemBuf::from(b"HTTP/1.1 200 OK\r\n\r\n".to_vec());