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

When linkerd proxy creates the response to a grpc request, it should add the header "content-type: application/grpc" #5273

Closed
Esardes opened this issue Nov 23, 2020 · 0 comments · Fixed by linkerd/linkerd2-proxy#750

Comments

@Esardes
Copy link

Esardes commented Nov 23, 2020

Bug Report

What is the issue?

When linkerd proxy creates the response to a grpc request, it does so without specifying the content-type (leading to clients being unhappy)

Possible solution

Add it when creating the answer(s) in the following file
https://github.com/linkerd/linkerd2-proxy/blob/main/linkerd/app/core/src/errors.rs#L205

@Esardes Esardes changed the title When linkerd proxy creates the response to a grpc request, it should add the hear "content-type: application/grpc" When linkerd proxy creates the response to a grpc request, it should add the header "content-type: application/grpc" Nov 23, 2020
hawkw added a commit to linkerd/linkerd2-proxy that referenced this issue Nov 23, 2020
The proxy will synthesize responses for some error conditions.
Currently, there's special logic for synthesizing errors for gRPC
requests: we emit `grpc-status` and `grpc-message` trailers rather than
HTTP status codes for gRPC requests. However, we *don't* currently set a
`content-type` header for gRPC error responses. This makes some clients
angry.

This commit adds a `content-type: application/grpc` header to
synthesized error responses for gRPC requests.

Fixes linkerd/linkerd2#5273
olix0r pushed a commit to linkerd/linkerd2-proxy that referenced this issue Nov 23, 2020
The proxy will synthesize responses for some error conditions.
Currently, there's special logic for synthesizing errors for gRPC
requests: we emit `grpc-status` and `grpc-message` trailers rather than
HTTP status codes for gRPC requests. However, we *don't* currently set a
`content-type` header for gRPC error responses. This makes some clients
angry.

This commit adds a `content-type: application/grpc` header to
synthesized error responses for gRPC requests.

Fixes linkerd/linkerd2#5273
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant