From 3e9782c2a9501a3122df8a54775a1fa7f2386fea Mon Sep 17 00:00:00 2001 From: luben karavelov Date: Mon, 11 Feb 2019 18:47:19 +0000 Subject: [PATCH] feat(server): add `http1_max_buf_size` in the `server::Builder` (#1761) Similarly to `client::Builder::http1_max_buf_size`. --- src/server/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/mod.rs b/src/server/mod.rs index 24f92f00b3..ef7144b4e5 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -302,6 +302,14 @@ impl Builder { self } + /// Set the maximum buffer size. + /// + /// Default is ~ 400kb. + pub fn http1_max_buf_size(mut self, val: usize) -> Self { + self.protocol.max_buf_size(val); + self + } + /// Sets the `Executor` to deal with connection tasks. /// /// Default is `tokio::spawn`.