summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/http/response_body.rs10
-rw-r--r--ext/http/service.rs4
2 files changed, 8 insertions, 6 deletions
diff --git a/ext/http/response_body.rs b/ext/http/response_body.rs
index 42080e8c9..bac43bf3c 100644
--- a/ext/http/response_body.rs
+++ b/ext/http/response_body.rs
@@ -92,9 +92,9 @@ pub enum ResponseBytesInner {
/// An uncompressed stream.
UncompressedStream(ResponseStream),
/// A GZip stream.
- GZipStream(GZipResponseStream),
+ GZipStream(Box<GZipResponseStream>),
/// A Brotli stream.
- BrotliStream(BrotliResponseStream),
+ BrotliStream(Box<BrotliResponseStream>),
}
impl std::fmt::Debug for ResponseBytesInner {
@@ -133,9 +133,11 @@ impl ResponseBytesInner {
fn from_stream(compression: Compression, stream: ResponseStream) -> Self {
match compression {
- Compression::GZip => Self::GZipStream(GZipResponseStream::new(stream)),
+ Compression::GZip => {
+ Self::GZipStream(Box::new(GZipResponseStream::new(stream)))
+ }
Compression::Brotli => {
- Self::BrotliStream(BrotliResponseStream::new(stream))
+ Self::BrotliStream(Box::new(BrotliResponseStream::new(stream)))
}
_ => Self::UncompressedStream(stream),
}
diff --git a/ext/http/service.rs b/ext/http/service.rs
index f38fec4f4..787e9babf 100644
--- a/ext/http/service.rs
+++ b/ext/http/service.rs
@@ -545,10 +545,10 @@ impl Body for HttpRecordResponse {
ready!(Pin::new(stm).poll_frame(cx))
}
ResponseBytesInner::GZipStream(stm) => {
- ready!(Pin::new(stm).poll_frame(cx))
+ ready!(Pin::new(stm.as_mut()).poll_frame(cx))
}
ResponseBytesInner::BrotliStream(stm) => {
- ready!(Pin::new(stm).poll_frame(cx))
+ ready!(Pin::new(stm.as_mut()).poll_frame(cx))
}
};
// This is where we retry the NoData response