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

Using HTTP/1.1 via grpc transport is not possible, protocol error: missing status #1393

Closed
dalechyn opened this issue Jan 3, 2025 · 1 comment

Comments

@dalechyn
Copy link

dalechyn commented Jan 3, 2025

validateTrailer(uRes.trailer, uRes.header);

This LOC checks for trailers, but when HTTP/1.1 is used no trailers are present, which always leads to protocol error: missing status error.

const trailer = new Headers();

I'd suggest disabling trailer validation in this case.

@dalechyn dalechyn changed the title Using HTTP/1.1 via grpc transport is not possible, Using HTTP/1.1 via grpc transport is not possible, protocol error: missing status Jan 3, 2025
@timostamm
Copy link
Member

gRPC requires HTTP trailers. For example, a streaming call could return a message, but then fail to return the next one. This error is encoded in HTTP trailers. When the trailers are missing, you'd never know that the call failed.

Because of this pitfall, we've disabled support for HTTP 1.1 with gRPC in #1279.

If you need HTTP 1.1, we recommend using the Connect protocol, or gRPC-Web. Both encode the status for streaming calls in the body, and do not need HTTP trailers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants