diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 85875077..b204b20a 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -15,7 +15,9 @@ tokio = "=0.2.0-alpha.4" tracing = "0.1" tracing-subscriber = "0.1" tracing-log = "=0.0.1-alpha.2" -hyper = "=0.13.0-alpha.1" +# Can't use published alpha because of conflicts tracking pin-project alphas +#hyper = "=0.13.0-alpha.1" +hyper = { git = "https://github.com/hyperium/hyper" } futures-core-preview = { version = "=0.3.0-alpha.18" } futures-util-preview = { version = "=0.3.0-alpha.18" } diff --git a/zebrad/src/components/tracing.rs b/zebrad/src/components/tracing.rs index e6bf823b..c5f15fe0 100644 --- a/zebrad/src/components/tracing.rs +++ b/zebrad/src/components/tracing.rs @@ -106,7 +106,8 @@ async fn filter_handler( handle: Handle, req: Request, ) -> Result, hyper::Error> { - use futures_util::TryStreamExt; + // XXX see below + //use futures_util::TryStreamExt; use hyper::{Method, StatusCode}; // We can't use #[instrument] because Handle<_,_> is not Debug, @@ -126,7 +127,12 @@ curl -X POST localhost:3000/filter -d "zebrad=trace" )), (&Method::POST, "/filter") => { // Combine all HTTP request chunks into one - let whole_chunk = req.into_body().try_concat().await?; + //let whole_chunk = req.into_body().try_concat().await?; + // XXX try_concat extension trait is not applying for some reason, + // just pull one chunk + let mut body = req.into_body(); + let maybe_chunk = body.next().await; + let whole_chunk = maybe_chunk.unwrap()?; match reload_filter_from_chunk(handle, whole_chunk) { Err(e) => Response::builder() .status(StatusCode::BAD_REQUEST)