Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions ext/http/response_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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),
}
Expand Down
4 changes: 2 additions & 2 deletions ext/http/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down