pin h2 temporarily

This commit is contained in:
Rob Ede 2021-12-09 00:44:44 +00:00
parent dbea33b2f2
commit 114b94c485
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
4 changed files with 12 additions and 3 deletions

View File

@ -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"

View File

@ -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]

View File

@ -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 {

View File

@ -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"