From 8cb654e015563e2153143c47f20ba1e0c149ef8f Mon Sep 17 00:00:00 2001 From: Jiahao Liang Date: Sat, 8 Oct 2022 11:53:14 +0800 Subject: [PATCH] fix(h2): add http2_max_header_list_size to hyper::server::Builder fix incomplete changes introduced from #2828 --- src/server/server.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server/server.rs b/src/server/server.rs index caa4aebd14..e4273674fc 100644 --- a/src/server/server.rs +++ b/src/server/server.rs @@ -425,6 +425,16 @@ impl Builder { self } + /// Sets the max size of received header frames. + /// + /// Default is currently ~16MB, but may change. + #[cfg(feature = "http2")] + #[cfg_attr(docsrs, doc(cfg(feature = "http2")))] + pub fn http2_max_header_list_size(mut self, max: u32) -> Self { + self.protocol.http2_max_header_list_size(max); + self + } + /// Sets the [`SETTINGS_MAX_CONCURRENT_STREAMS`][spec] option for HTTP2 /// connections. ///