From 114b94c4858bddad5dfe6f376fdcf4d6215724ab Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 9 Dec 2021 00:44:44 +0000 Subject: [PATCH] pin h2 temporarily --- actix-http/Cargo.toml | 2 +- actix-http/src/body/message_body.rs | 9 +++++++++ actix-http/tests/test_openssl.rs | 2 +- awc/Cargo.toml | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index 6216af3d1..5c5a0cc86 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -56,7 +56,7 @@ derive_more = "0.99.5" encoding_rs = "0.8" futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] } futures-util = { version = "0.3.7", default-features = false, features = ["alloc", "sink"] } -h2 = "0.3.1" +h2 = "=0.3.7" http = "0.2.5" httparse = "1.5.1" httpdate = "1.0.1" diff --git a/actix-http/src/body/message_body.rs b/actix-http/src/body/message_body.rs index c360a7d28..72271f73e 100644 --- a/actix-http/src/body/message_body.rs +++ b/actix-http/src/body/message_body.rs @@ -522,6 +522,15 @@ mod tests { assert_poll_next!(pl, Bytes::from("test")); } + #[actix_rt::test] + async fn big_string() { + let mut data = "HELLOWORLD".repeat(64 * 1024); + let data_bytes = Bytes::from(data.clone()); + + assert!(data.is_complete_body()); + assert_eq!(data.take_complete_body(), data_bytes); + } + // down-casting used to be done with a method on MessageBody trait // test is kept to demonstrate equivalence of Any trait #[actix_rt::test] diff --git a/actix-http/tests/test_openssl.rs b/actix-http/tests/test_openssl.rs index 0c373b8b2..1e371473f 100644 --- a/actix-http/tests/test_openssl.rs +++ b/actix-http/tests/test_openssl.rs @@ -101,7 +101,7 @@ async fn test_h2_1() -> io::Result<()> { #[actix_rt::test] async fn test_h2_body() -> io::Result<()> { - let data = "HELLOWORLD".to_owned().repeat(64 * 1024); + let data = "HELLOWORLD".to_owned().repeat(64 * 1024); // 640 KiB let mut srv = test_server(move || { HttpService::build() .h2(|mut req: Request<_>| async move { diff --git a/awc/Cargo.toml b/awc/Cargo.toml index 836241d46..cdbd0b6aa 100644 --- a/awc/Cargo.toml +++ b/awc/Cargo.toml @@ -72,7 +72,7 @@ cfg-if = "1" derive_more = "0.99.5" futures-core = { version = "0.3.7", default-features = false } futures-util = { version = "0.3.7", default-features = false } -h2 = "0.3" +h2 = "=0.3.7" http = "0.2.5" itoa = "0.4" log =" 0.4"