From: Ian Jackson Date: Sun, 15 Aug 2021 17:17:51 +0000 (+0100) Subject: server: apply length limit X-Git-Tag: hippotat/1.0.0~174 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=hippotat.git;a=commitdiff_plain;h=407e6511edc91f4eca3170eb0b80a96a6199a6f3 server: apply length limit Signed-off-by: Ian Jackson --- 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