1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

Handling scoped paths without leading slashes #460

This commit is contained in:
Nikolay Kim
2018-09-02 08:14:54 -07:00
parent d5957a8466
commit 968c81e267
3 changed files with 71 additions and 20 deletions

View File

@ -948,8 +948,7 @@ fn test_default_404_handler_response() {
tokio::io::write_all(sock, "HEAD / HTTP/1.1\r\nHost: localhost\r\n\r\n")
.and_then(|(sock, _)| tokio::io::read_exact(sock, &mut buf))
.and_then(|(_, buf)| Ok(buf))
})
.map_err(|e| panic!("{:?}", e));
}).map_err(|e| panic!("{:?}", e));
let response = srv.execute(request).unwrap();
let rep = String::from_utf8_lossy(&response[..]);
assert!(rep.contains("HTTP/1.1 404 Not Found"));