diff --git a/examples/hyper-1-0/Cargo.toml b/examples/hyper-1-0/Cargo.toml index 772b268d..54ed3d81 100644 --- a/examples/hyper-1-0/Cargo.toml +++ b/examples/hyper-1-0/Cargo.toml @@ -6,9 +6,10 @@ publish = false [dependencies] axum = { path = "../../axum" } -hyper = { version = "1.0.0-rc.3", features = ["full"] } +hyper = { version = "1.0.0-rc.4", features = ["full"] } +hyper-util = { git = "https://github.com/hyperium/hyper-util", rev = "f898015" } tokio = { version = "1.0", features = ["full"] } tower-http = { version = "0.4", features = ["trace"] } -tower-hyper-http-body-compat = { version = "0.1", features = ["http1", "server"] } +tower-hyper-http-body-compat = { version = "0.2", features = ["http1", "server"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/examples/hyper-1-0/src/main.rs b/examples/hyper-1-0/src/main.rs index 72c651cc..e4a343a2 100644 --- a/examples/hyper-1-0/src/main.rs +++ b/examples/hyper-1-0/src/main.rs @@ -41,6 +41,7 @@ async fn main() { tracing::debug!("listening on {addr}"); loop { let (tcp_stream, _) = tcp_listener.accept().await.unwrap(); + let tcp_stream = hyper_util::rt::TokioIo::new(tcp_stream); let service = service.clone(); tokio::task::spawn(async move { if let Err(http_err) = http1::Builder::new()