chiark / gitweb /
server: collect body
[hippotat.git] / src / bin / server.rs
index e38b1176aa8cfd11e864a04a780a30b61e55aade..b956101e681a2fba8c20dc0f5652fc80a1e15ba4 100644 (file)
@@ -243,9 +243,23 @@ async fn run_client(_ic: Arc<InstanceConfig>,
           reply_to, warnings,
         } = req.ok_or_else(|| anyhow!("webservers all shut down!"))?;
 
-        match (||{
+        match async {
+
+          let whole_request = body.try_fold(
+            initial.into_vec(),
+            |mut w, by| async move { w.extend_from_slice(&by); Ok(w) },
+          ).await.context("read request body")?;
+
+          dbg!(whole_request.len());
+
+/*          
+
+          multipart::ComponentIterator::resume_mid_component(
+            &initial[initial_remaining..],
+  */          
+
           Ok::<_,AE>(())
-        })() {
+        }.await {
           Ok(()) => outstanding.push_back(Outstanding {
             reply_to: reply_to,
             max_requests_outstanding: 42, // xxx