We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78e95d3 commit 8b0cafaCopy full SHA for 8b0cafa
tower-http/src/decompression/body.rs
@@ -15,7 +15,7 @@ use async_compression::tokio::bufread::ZlibDecoder;
15
use async_compression::tokio::bufread::ZstdDecoder;
16
use bytes::{Buf, Bytes};
17
use http::HeaderMap;
18
-use http_body::Body;
+use http_body::{Body, SizeHint};
19
use pin_project_lite::pin_project;
20
use std::task::Context;
21
use std::{
@@ -326,6 +326,13 @@ where
326
BodyInnerProj::Zstd { inner } => match inner.0 {},
327
}
328
329
+
330
+ fn size_hint(&self) -> SizeHint {
331
+ match self.inner {
332
+ BodyInner::Identity { ref inner } => inner.size_hint(),
333
+ _ => SizeHint::default(),
334
+ }
335
336
337
338
#[cfg(feature = "decompression-gzip")]
0 commit comments