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`.