Skip to content

Commit 3e9782c

Browse files
lubenseanmonstar
authored andcommitted
feat(server): add http1_max_buf_size in the server::Builder (#1761)
Similarly to `client::Builder::http1_max_buf_size`.
1 parent e52f80d commit 3e9782c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/server/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,14 @@ impl<I, E> Builder<I, E> {
302302
self
303303
}
304304

305+
/// Set the maximum buffer size.
306+
///
307+
/// Default is ~ 400kb.
308+
pub fn http1_max_buf_size(mut self, val: usize) -> Self {
309+
self.protocol.max_buf_size(val);
310+
self
311+
}
312+
305313
/// Sets the `Executor` to deal with connection tasks.
306314
///
307315
/// Default is `tokio::spawn`.

0 commit comments

Comments
 (0)