From 6024592ccb11c66132bd85322063f832ef5a0455 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Wed, 15 Nov 2023 11:06:53 -0500 Subject: [PATCH] update http to 1.0 --- Cargo.toml | 2 +- fuzz/Cargo.toml | 2 +- tests/h2-fuzz/Cargo.toml | 2 +- tests/h2-support/Cargo.toml | 2 +- tests/h2-tests/tests/server.rs | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 53f9043c..b8d4c027 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ futures-util = { version = "0.3", default-features = false } tokio-util = { version = "0.7.1", features = ["codec", "io"] } tokio = { version = "1", features = ["io-util"] } bytes = "1" -http = "0.2" +http = "1" tracing = { version = "0.1.35", default-features = false, features = ["std"] } fnv = "1.0.5" slab = "0.4.2" diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index aafb60ae..922eca23 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -16,7 +16,7 @@ tokio = { version = "1", features = [ "full" ] } h2 = { path = "../", features = [ "unstable" ] } h2-support = { path = "../tests/h2-support" } futures = { version = "0.3", default-features = false, features = ["std"] } -http = "0.2" +http = "1" # Prevent this from interfering with workspaces [workspace] diff --git a/tests/h2-fuzz/Cargo.toml b/tests/h2-fuzz/Cargo.toml index dadb62c9..b0f9599e 100644 --- a/tests/h2-fuzz/Cargo.toml +++ b/tests/h2-fuzz/Cargo.toml @@ -11,5 +11,5 @@ h2 = { path = "../.." } env_logger = { version = "0.9", default-features = false } futures = { version = "0.3", default-features = false, features = ["std"] } honggfuzz = "0.5" -http = "0.2" +http = "1" tokio = { version = "1", features = [ "full" ] } diff --git a/tests/h2-support/Cargo.toml b/tests/h2-support/Cargo.toml index 522d904c..970648d5 100644 --- a/tests/h2-support/Cargo.toml +++ b/tests/h2-support/Cargo.toml @@ -14,6 +14,6 @@ tracing = "0.1" tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] } tracing-tree = "0.2" futures = { version = "0.3", default-features = false } -http = "0.2" +http = "1" tokio = { version = "1", features = ["time"] } tokio-test = "0.4" diff --git a/tests/h2-tests/tests/server.rs b/tests/h2-tests/tests/server.rs index 6075c7dc..dd97e94d 100644 --- a/tests/h2-tests/tests/server.rs +++ b/tests/h2-tests/tests/server.rs @@ -1126,6 +1126,7 @@ async fn request_without_authority() { #[tokio::test] async fn serve_when_request_in_response_extensions() { + use std::sync::Arc; h2_support::trace_init!(); let (io, mut client) = mock::new(); @@ -1149,7 +1150,7 @@ async fn serve_when_request_in_response_extensions() { let (req, mut stream) = srv.next().await.unwrap().unwrap(); let mut rsp = http::Response::new(()); - rsp.extensions_mut().insert(req); + rsp.extensions_mut().insert(Arc::new(req)); stream.send_response(rsp, true).unwrap(); assert!(srv.next().await.is_none());