From 0fbc92fd726d65bf69bb1c3050649b1b8eeaa942 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Mar 2026 16:48:56 +0100 Subject: [PATCH 1/2] feat: add http2_header_table_size to Builder in client.rs (#1) Adds `http2_header_table_size` method to the client `Builder` --- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: barjin <61918049+barjin@users.noreply.github.com> --- src/client/legacy/client.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/client/legacy/client.rs b/src/client/legacy/client.rs index c9d00800..7e2b2bd6 100644 --- a/src/client/legacy/client.rs +++ b/src/client/legacy/client.rs @@ -1426,6 +1426,18 @@ impl Builder { self } + /// Sets the header table size to use for HTTP2. + /// + /// Passing `None` will do nothing. + /// + /// If not set, hyper will use a default. + #[cfg(feature = "http2")] + #[cfg_attr(docsrs, doc(cfg(feature = "http2")))] + pub fn http2_header_table_size(&mut self, size: impl Into>) -> &mut Self { + self.h2_builder.header_table_size(size); + self + } + /// Sets an interval for HTTP2 Ping frames should be sent to keep a /// connection alive. /// From 8cde3120ce1b4992983936424f731b32b08f5d2f Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Mar 2026 17:03:45 +0100 Subject: [PATCH 2/2] feat: add http2_max_concurrent_streams to Builder in client.rs (#2) Builder in client.rs was missing a method to configure the HTTP/2 SETTINGS_MAX_CONCURRENT_STREAMS value, despite h2_builder exposing max_concurrent_streams. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: barjin <61918049+barjin@users.noreply.github.com> --- src/client/legacy/client.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/client/legacy/client.rs b/src/client/legacy/client.rs index 7e2b2bd6..c5063e1b 100644 --- a/src/client/legacy/client.rs +++ b/src/client/legacy/client.rs @@ -1512,6 +1512,18 @@ impl Builder { self } + /// Sets the `SETTINGS_MAX_CONCURRENT_STREAMS` option for HTTP2 connections. + /// + /// Passing `None` will do nothing. + /// + /// The default value is determined by the `h2` crate. + #[cfg(feature = "http2")] + #[cfg_attr(docsrs, doc(cfg(feature = "http2")))] + pub fn http2_max_concurrent_streams(&mut self, max: impl Into>) -> &mut Self { + self.h2_builder.max_concurrent_streams(max); + self + } + /// Provide a timer to be used for h2 /// /// See the documentation of [`h2::client::Builder::timer`] for more