diff --git a/Cargo.toml b/Cargo.toml
index 1667aa59..162f5a93 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,3 +3,7 @@ members = [
"tower-http",
"examples/*",
]
+
+[patch.crates-io]
+# for `Frame::map_data`
+http-body = { git = "https://github.com/hyperium/http-body", rev = "7bf321acbb422214c89933c103417bcfe3892aed" }
diff --git a/tower-http/Cargo.toml b/tower-http/Cargo.toml
index 9ef26363..0d5ac2b7 100644
--- a/tower-http/Cargo.toml
+++ b/tower-http/Cargo.toml
@@ -18,7 +18,8 @@ bytes = "1"
futures-core = "0.3"
futures-util = { version = "0.3.14", default_features = false, features = [] }
http = "0.2.2"
-http-body = "0.4.5"
+http-body = "1.0.0-rc.2"
+http-body-util = "0.1.0-rc.2"
pin-project-lite = "0.2.7"
tower-layer = "0.3"
tower-service = "0.3"
@@ -39,6 +40,7 @@ httpdate = { version = "1.0", optional = true }
uuid = { version = "1.0", features = ["v4"], optional = true }
[dev-dependencies]
+async-trait = "0.1"
bytes = "1"
flate2 = "1.0"
brotli = "3"
diff --git a/tower-http/src/catch_panic.rs b/tower-http/src/catch_panic.rs
index b547b32d..caa3a496 100644
--- a/tower-http/src/catch_panic.rs
+++ b/tower-http/src/catch_panic.rs
@@ -86,7 +86,8 @@ use bytes::Bytes;
use futures_core::ready;
use futures_util::future::{CatchUnwind, FutureExt};
use http::{HeaderValue, Request, Response, StatusCode};
-use http_body::{combinators::UnsyncBoxBody, Body, Full};
+use http_body::Body;
+use http_body_util::{combinators::UnsyncBoxBody, BodyExt, Full};
use pin_project_lite::pin_project;
use std::{
any::Any,
diff --git a/tower-http/src/compression/body.rs b/tower-http/src/compression/body.rs
index eeb798ba..486a14bb 100644
--- a/tower-http/src/compression/body.rs
+++ b/tower-http/src/compression/body.rs
@@ -247,46 +247,29 @@ where
type Data = Bytes;
type Error = BoxError;
- fn poll_data(
+ fn poll_frame(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
- ) -> Poll