mirror of
https://github.com/actix/actix-web.git
synced 2024-12-18 22:26:37 +00:00
Add client test for 'Connection: close' as reported in issue #495
This commit is contained in:
parent
af6caa92c8
commit
487519acec
1 changed files with 10 additions and 0 deletions
|
@ -66,6 +66,16 @@ fn test_simple() {
|
|||
assert_eq!(bytes, Bytes::from_static(STR.as_ref()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_connection_close() {
|
||||
let mut srv =
|
||||
test::TestServer::new(|app| app.handler(|_| HttpResponse::Ok().body(STR)));
|
||||
|
||||
let request = srv.get().header("Connection", "close").finish().unwrap();
|
||||
let response = srv.execute(request.send()).unwrap();
|
||||
assert!(response.status().is_success());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_with_query_parameter() {
|
||||
let mut srv = test::TestServer::new(|app| {
|
||||
|
|
Loading…
Reference in a new issue