test(http): test Uri parse errors propagate
This commit is contained in:
@@ -282,6 +282,11 @@ mod tests {
|
|||||||
parse::<http::ServerTransaction, _>(&raw).unwrap();
|
parse::<http::ServerTransaction, _>(&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::<http::ServerTransaction, _>(&raw).unwrap_err();
|
||||||
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_raw_status() {
|
fn test_parse_raw_status() {
|
||||||
let raw = MemBuf::from(b"HTTP/1.1 200 OK\r\n\r\n".to_vec());
|
let raw = MemBuf::from(b"HTTP/1.1 200 OK\r\n\r\n".to_vec());
|
||||||
|
|||||||
Reference in New Issue
Block a user