Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
} = req.ok_or_else(|| anyhow!("webservers all shut down!"))?;
match async {
- let whole_request =
- StreamExt::chain(
- stream::once(Ok(
- &initial[initial_remaining..]
- )),
- body.map_ok(
- |by| &*by
- ),
- )
- .try_collect().await.context("read request body")?;
+
+ 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(
pub use cervine::Cow as Cervine;
pub use extend::ext;
pub use fehler::{throw, throws};
-pub use futures::{poll, future, StreamExt as _};
+pub use futures::{poll, future, StreamExt, TryStreamExt};
pub use hyper::body::{Bytes, Buf as _};
pub use hyper::{Method, Uri};
pub use hyper_tls::HttpsConnector;