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
Respond with application/json for httpjson transcoding endpoints #4474
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @j-min5u! 😄
@@ -603,7 +602,7 @@ private HttpResponse serve0(ServiceRequestContext ctx, HttpRequest req, | |||
ctx.setAttr(FramedGrpcService.RESOLVED_GRPC_METHOD, spec.method); | |||
frameAndServe(unwrap(), ctx, grpcHeaders.build(), | |||
convertToJson(ctx, clientRequest, spec), | |||
responseFuture, generateResponseBodyConverter(spec), jsonContentType); | |||
responseFuture, generateResponseBodyConverter(spec), MediaType.JSON_UTF_8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Let's leave a link to this https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/grpc_json_transcoder_filter#sending-arbitrary-content that explains why we set JSON media type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick fix @j-min5u ! 🙇 👍 🙇
Can you also check the lint failures? 😅 |
Codecov ReportBase: 74.04% // Head: 74.08% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #4474 +/- ##
============================================
+ Coverage 74.04% 74.08% +0.03%
- Complexity 18164 18173 +9
============================================
Files 1536 1536
Lines 67379 67378 -1
Branches 8520 8520
============================================
+ Hits 49889 49914 +25
+ Misses 13416 13401 -15
+ Partials 4074 4063 -11
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and welcome back! 😁
Motivation:
Wrong response contenttype served for http json transcoding endpoints as result of #4364
Modifications:
Result:
application/json
butapplicaiton/grpc+json
#4473