From: Ian Jackson Date: Sun, 15 Aug 2021 17:15:29 +0000 (+0100) Subject: server: plumb Content-Length length hint X-Git-Tag: hippotat/1.0.0~176 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=hippotat.git;a=commitdiff_plain;h=029c0012c14c3a373d63eafc4470a73354fd8a91 server: plumb Content-Length length hint Signed-off-by: Ian Jackson --- diff --git a/src/bin/server.rs b/src/bin/server.rs index ceceddb..fec69cf 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -30,6 +30,7 @@ struct WebRequest { // end delimiter for the metadata not yet located, but in here somewhere initial: Box<[u8]>, initial_remaining: usize, + length_hint: usize, body: hyper::body::Body, reply_to: tokio::sync::oneshot::Sender, warnings: Warnings, @@ -184,6 +185,7 @@ async fn handle( let wreq = WebRequest { initial, initial_remaining, + length_hint, body, warnings: mem::take(&mut warnings), reply_to @@ -254,7 +256,7 @@ async fn run_client(_ic: Arc, req = web.recv() => { let WebRequest { - initial, initial_remaining, body, + initial, initial_remaining, length_hint, body, reply_to, warnings, } = req.ok_or_else(|| anyhow!("webservers all shut down!"))?;