chiark / gitweb /
server: trace a bit more
[hippotat.git] / src / bin / server.rs
index bb1c6d6736112d5f5af0ba3a9f00bbf11481cb9f..ae130d8307960837b231a07d7dc0e6779b2330a9 100644 (file)
@@ -183,6 +183,7 @@ async fn handle(
     // boundary, start, &comp.name, &client.ic);
 
     let (reply_to, reply_recv) = tokio::sync::oneshot::channel();
+    trace!("{} request xxx={}", &client.ic, initial.len());
     let wreq = WebRequest {
       initial,
       initial_remaining,
@@ -192,7 +193,6 @@ async fn handle(
       warnings: mem::take(&mut warnings),
       reply_to
     };
-    trace!("{} request", &client.ic);
 
     client.web.try_send(wreq)
       .map_err(|_| anyhow!("client task shut down!"))?;
@@ -266,6 +266,8 @@ async fn run_client(ic: Arc<InstanceConfig>,
 
         match async {
 
+          let initial_used = initial.len() - initial_remaining;
+
           let whole_request = read_limited_bytes(
             ic.max_batch_up.sat(),
             initial,
@@ -275,7 +277,7 @@ async fn run_client(ic: Arc<InstanceConfig>,
 
           let (meta, comps) =
             multipart::ComponentIterator::resume_mid_component(
-              &whole_request[initial_remaining..],
+              &whole_request[initial_used..],
               boundary_finder
             ).context("resume parsing body, after auth checks")?;