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

Custom transports cannot use call options or exchange response headers and trailers for unary methods #6

Closed
jhump opened this issue Mar 8, 2018 · 0 comments · Fixed by #9

Comments

@jhump
Copy link
Contributor

jhump commented Mar 8, 2018

gRPC's call options, which are passed to stub interfaces, are opaque. This prevents a custom transport implementation from examining them and properly acting on them.

In particular, this means that a unary method invocation cannot get response headers since that is done via call options. There is an issue tracking this API deficiency in the grpc-go repo: grpc/grpc-go#1495

There is a similar issue in the server-side. Attempts to send response headers from unary handlers that are invoked from a custom transport implementation will always return an error. This is because the grpc.SetHeader (and company) methods are expecting to find a *transport.Stream in context (which is put there by the HTTP/2 transport implementation). But no API is exposed to allow custom transports to do something similar. This issue is also being tracked in the grpc-go repo: grpc/grpc-go#1802

This grpchan bug will persist until these issues are addressed.

I happen to have two open pull requests which would address them. I am hoping they will be accepted:
grpc/grpc-go#1902 and grpc/grpc-go#1904.

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