From 407e6511edc91f4eca3170eb0b80a96a6199a6f3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 15 Aug 2021 18:17:51 +0100 Subject: [PATCH] server: apply length limit Signed-off-by: Ian Jackson --- src/bin/server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/server.rs b/src/bin/server.rs index e7daf48..fdee557 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -213,7 +213,7 @@ async fn handle( } #[allow(unused_variables)] // xxx -async fn run_client(_ic: Arc, +async fn run_client(ic: Arc, mut web: mpsc::Receiver) -> Result { @@ -263,7 +263,7 @@ async fn run_client(_ic: Arc, match async { let whole_request = read_limited_bytes( - usize::MAX /* xxx */, + ic.max_batch_up.sat(), initial, length_hint, &mut body -- 2.30.2