From 1017e44af9d60ca36775bc41844a205fc68b83e5 Mon Sep 17 00:00:00 2001 From: Yusuke Tanaka Date: Wed, 28 Feb 2024 01:06:33 +0900 Subject: [PATCH 1/2] chore: update hyper to 1.2.0 --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 610f300..9ec456a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ features = ["full"] rustdoc-args = ["--cfg", "docsrs"] [dependencies] -hyper = "1.1.0" +hyper = "1.2.0" futures-util = { version = "0.3.16", default-features = false } http = "1.0" http-body = "1.0.0" @@ -31,7 +31,7 @@ tower-service ={ version = "0.3", optional = true } tower = { version = "0.4.1", optional = true, features = ["make", "util"] } [dev-dependencies] -hyper = { version = "1.1.0", features = ["full"] } +hyper = { version = "1.2.0", features = ["full"] } bytes = "1" http-body-util = "0.1.0" tokio = { version = "1", features = ["macros", "test-util"] } From 552984e9aea9df438cc8584d5ae340b9a1af19c1 Mon Sep 17 00:00:00 2001 From: Yusuke Tanaka Date: Sat, 13 Jan 2024 18:02:52 +0900 Subject: [PATCH 2/2] feat(http2): add `initial_max_send_streams` method to client builder --- src/client/legacy/client.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/client/legacy/client.rs b/src/client/legacy/client.rs index 6043f02..8022055 100644 --- a/src/client/legacy/client.rs +++ b/src/client/legacy/client.rs @@ -1291,6 +1291,26 @@ impl Builder { self } + /// Sets the initial maximum of locally initiated (send) streams. + /// + /// This value will be overwritten by the value included in the initial + /// SETTINGS frame received from the peer as part of a [connection preface]. + /// + /// Passing `None` will do nothing. + /// + /// If not set, hyper will use a default. + /// + /// [connection preface]: https://httpwg.org/specs/rfc9113.html#preface + #[cfg(feature = "http2")] + #[cfg_attr(docsrs, doc(cfg(feature = "http2")))] + pub fn http2_initial_max_send_streams( + &mut self, + initial: impl Into>, + ) -> &mut Self { + self.h2_builder.initial_max_send_streams(initial); + self + } + /// Sets whether to use an adaptive flow control. /// /// Enabling this will override the limits set in