1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-10-21 17:33:59 +00: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 {
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]