-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
C-bugCategory: Something isn't workingCategory: Something isn't working
Description
Bug Report
When non-gRPC error is returned, for example 502 bad gateway by a proxy server, tonic client returns an error like
status: Internal, message: "protocol error: received message with invalid compression flag: 60 (valid flags are 0 and 1) while receiving response with status: 502 Bad Gateway", details: [], metadata: MetadataMap { headers: {"date": "Fri, 01 Aug 2025 02:23:45 GMT", "content-type": "text/html", "content-length": "150", "strict-transport-security": "max-age=31536000; includeSubDomains"} }
Content-type is not application/grpc, so attempt to read first byte as either 0 or 1 for compression is incorrect.
Version
0.13
Error comes from here:
tonic/tonic/src/codec/decode.rs
Line 176 in 87d2d4c
| "protocol error: received message with invalid compression flag: {f} (valid flags are 0 and 1) while receiving response with status: {status}" |
Metadata
Metadata
Assignees
Labels
C-bugCategory: Something isn't workingCategory: Something isn't working