1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 07:53:00 +01:00

test case for broken transfer encoding

This commit is contained in:
Nikolay Kim 2018-01-20 16:51:18 -08:00
parent ae10a89014
commit 98931a8623

View File

@ -1201,6 +1201,18 @@ mod tests {
} else { } else {
panic!("Error"); panic!("Error");
} }
// type in chunked
let mut buf = Buffer::new(
"GET /test HTTP/1.1\r\n\
transfer-encoding: chnked\r\n\r\n");
let req = parse_ready!(&mut buf);
if let Ok(val) = req.chunked() {
assert!(!val);
} else {
panic!("Error");
}
} }
#[test] #[test]