diff --git a/Cargo.toml b/Cargo.toml index c1a2e184..c5ef5f06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-web" -version = "1.0.0-alpha.3" +version = "1.0.0-alpha.2" authors = ["Nikolay Kim "] description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust." readme = "README.md" diff --git a/actix-files/src/lib.rs b/actix-files/src/lib.rs index d5a47653..8404ab31 100644 --- a/actix-files/src/lib.rs +++ b/actix-files/src/lib.rs @@ -552,7 +552,7 @@ impl

FromRequest

for PathBufWrp { type Future = Result; fn from_request(req: &mut ServiceFromRequest

) -> Self::Future { - PathBufWrp::get_pathbuf(req.match_info().path()) + PathBufWrp::get_pathbuf(req.request().match_info().path()) } } @@ -1049,7 +1049,7 @@ mod tests { .new_service(&()), ) .unwrap(); - let req = TestRequest::with_uri("/missing").to_service(); + let req = TestRequest::with_uri("/missing").to_srv_request(); let mut resp = test::call_success(&mut st, req); assert_eq!(resp.status(), StatusCode::OK); diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index a9fda44e..2de624b7 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-http" -version = "0.1.0-alpha.3" +version = "0.1.0-alpha.2" authors = ["Nikolay Kim "] description = "Actix http primitives" readme = "README.md" diff --git a/actix-session/src/cookie.rs b/actix-session/src/cookie.rs index 9e4fe78b..f7b4ec03 100644 --- a/actix-session/src/cookie.rs +++ b/actix-session/src/cookie.rs @@ -333,6 +333,7 @@ mod tests { let request = test::TestRequest::get().to_request(); let response = test::block_on(app.call(request)).unwrap(); assert!(response + .response() .cookies() .find(|c| c.name() == "actix-session") .is_some()); @@ -352,6 +353,7 @@ mod tests { let request = test::TestRequest::get().to_request(); let response = test::block_on(app.call(request)).unwrap(); assert!(response + .response() .cookies() .find(|c| c.name() == "actix-session") .is_some()); diff --git a/actix-session/src/lib.rs b/actix-session/src/lib.rs index 819773c6..0cd1b9ed 100644 --- a/actix-session/src/lib.rs +++ b/actix-session/src/lib.rs @@ -190,7 +190,7 @@ mod tests { #[test] fn session() { - let mut req = test::TestRequest::default().to_service(); + let mut req = test::TestRequest::default().to_srv_request(); Session::set_session( vec![("key".to_string(), "\"value\"".to_string())].into_iter(), diff --git a/actix-web-actors/src/ws.rs b/actix-web-actors/src/ws.rs index 43601188..b2c0d404 100644 --- a/actix-web-actors/src/ws.rs +++ b/actix-web-actors/src/ws.rs @@ -64,7 +64,7 @@ pub fn handshake(req: &HttpRequest) -> Result"] description = "Actix http client." readme = "README.md" diff --git a/awc/tests/test_client.rs b/awc/tests/test_client.rs index 6aed72e4..a2882708 100644 --- a/awc/tests/test_client.rs +++ b/awc/tests/test_client.rs @@ -45,14 +45,14 @@ fn test_simple() { }); let request = srv.get("/").header("x-test", "111").send(); - let response = srv.block_on(request).unwrap(); + let mut response = srv.block_on(request).unwrap(); assert!(response.status().is_success()); // read response let bytes = srv.block_on(response.body()).unwrap(); assert_eq!(bytes, Bytes::from_static(STR.as_ref())); - let response = srv.block_on(srv.post("/").send()).unwrap(); + let mut response = srv.block_on(srv.post("/").send()).unwrap(); assert!(response.status().is_success()); // read response @@ -177,7 +177,7 @@ fn test_client_gzip_encoding() { }); // client request - let response = srv.block_on(srv.post("/").send()).unwrap(); + let mut response = srv.block_on(srv.post("/").send()).unwrap(); assert!(response.status().is_success()); // read response @@ -200,7 +200,7 @@ fn test_client_gzip_encoding_large() { }); // client request - let response = srv.block_on(srv.post("/").send()).unwrap(); + let mut response = srv.block_on(srv.post("/").send()).unwrap(); assert!(response.status().is_success()); // read response @@ -229,7 +229,7 @@ fn test_client_gzip_encoding_large_random() { }); // client request - let response = srv.block_on(srv.post("/").send_body(data.clone())).unwrap(); + let mut response = srv.block_on(srv.post("/").send_body(data.clone())).unwrap(); assert!(response.status().is_success()); // read response @@ -253,7 +253,7 @@ fn test_client_brotli_encoding() { }); // client request - let response = srv.block_on(srv.post("/").send_body(STR)).unwrap(); + let mut response = srv.block_on(srv.post("/").send_body(STR)).unwrap(); assert!(response.status().is_success()); // read response