You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tonic = "0.12.3"
tower = { version = "0.5.2", features = ["full"] }
tower-http = { version = "0.6.2", features = ["full"] }
Description
Looks like adding CompressionLayer::new() causes gRPC trailers to get dropped.
More
This gets thrown by the client:
❯ grpcurl ...
...
Response trailers received:
(empty)
Sent 1 request and received 0 responses
ERROR:
Code: Internal
Message: server closed the stream without sending trailers
And connection error in the servers gets thrown (sometimes) - maybe specifically this is an issue of grpcurl + tonic?
I believe what happens is that the Compression layer wraps the impl Body into a different interface (likely an AsyncRead) that the compression library can use. In that case, since AsyncRead only deals in data bytes, all other frames are dropped, such as the trailers.
One solution could be to make those wrapper types have a slot to store trailers when received, and then once the compression is done, check if trailers are in that slot before saying the body has ended.
I'm unsure if this is related to #414.
Bug Report
Platform
Linux archlinux 6.13.3-arch1-1 x86_64 GNU/Linux
Crates
tonic = "0.12.3"
tower = { version = "0.5.2", features = ["full"] }
tower-http = { version = "0.6.2", features = ["full"] }
Description
Looks like adding
CompressionLayer::new()
causes gRPC trailers to get dropped.More
This gets thrown by the client:
And connection error in the servers gets thrown (sometimes) - maybe specifically this is an issue of grpcurl + tonic?
RUST_LOG=debug.
Expected
Error status trailers should not be dropped by compression.
This is what I get when I remove the
.layer(CompressionLayer::new())
line:Simple reproduction
Speculation
I have not looked into the implementation internally yet, but I'm assuming compression just drops the whole request if the content body is empty?
The text was updated successfully, but these errors were encountered: