Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only use trailers-only response in grpc-web when there are no custom headers #677

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

jhump
Copy link
Member

@jhump jhump commented Feb 2, 2024

I pulled this commit into the conformance repo to verify that this change is compatible with the official gRPC-Web JS client. In fact, I added some conformance test cases around it (connectrpc/conformance#770) to verify that a gRPC-Web client will correctly accept both forms of "empty" response (for both unary and streams):

  1. Headers, no response messages, trailers in the body
  2. Trailers-only (where trailers are in HTTP headers)

The only issue with the gRPC-Web JS client was that it doesn't like it when in-body trailers contains a key more than once. It doesn't fail, but later values overwrite earlier ones instead of it merging all of the values. (I went ahead and filed a bug for it: grpc/grpc-web#1399. It's trivial to fix, so I might open a pull request, too.)

@jhump jhump merged commit c83ce94 into main Feb 7, 2024
14 checks passed
@jhump jhump deleted the jh/grpc-web-clarifications branch February 7, 2024 01:50
@jhump jhump added the bug Something isn't working label Feb 16, 2024
@jhump jhump mentioned this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants