Skip to content

Commit d0c522b

Browse files
authored
compression: the identity body should respect is_end_stream (#535)
This breaks certain gRPC failure scenarios when not compressing. Signed-off-by: Matt Klein <mklein@bitdrift.io>
1 parent 93d31c1 commit d0c522b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tower-http/src/compression/body.rs

+8
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,14 @@ where
277277
http_body::SizeHint::new()
278278
}
279279
}
280+
281+
fn is_end_stream(&self) -> bool {
282+
if let BodyInner::Identity { inner } = &self.inner {
283+
inner.is_end_stream()
284+
} else {
285+
false
286+
}
287+
}
280288
}
281289

282290
#[cfg(feature = "compression-gzip")]

0 commit comments

Comments
 (0)