-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle
grpc-status
in headers rather than only trailers (#174)
"Trailers-only" responses can actually be just headers, in which case we should read `grpc-status` from them. This PR: - Updates the logic for both unary and streaming APIs to properly handle cases where "trailers-only" responses are returned using the headers block - Updates the conformance test suite to test against grpc-go in addition to connect-go in order to catch this case. (grpc-go returns "trailers-only" responses in headers, and connect-go returns them in trailers) Here's the new logic for gRPC: - If non-HTTP 200, report an invalid response - If no body data, assume "trailers-only" - Look for the gRPC status and error details in the headers - Look for the gRPC status and error details in the trailers - If the status is an error, don't process the body Resolves #168.
- Loading branch information
Showing
4 changed files
with
93 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters