mirror of
https://github.com/actix/actix-web.git
synced 2024-12-21 15:46:48 +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()));
|
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]
|
#[test]
|
||||||
fn test_with_query_parameter() {
|
fn test_with_query_parameter() {
|
||||||
let mut srv = test::TestServer::new(|app| {
|
let mut srv = test::TestServer::new(|app| {
|
||||||
|
|
Loading…
Reference in a new issue