Skip to content

grpc_json_transcoder header not handled proply #8053

@elvizlai

Description

@elvizlai

grpc-status Header is missing when gRPC status > Status::GrpcStatus::MaximumValid

https://github.com/envoyproxy/envoy/blob/master/source/extensions/filters/http/grpc_json_transcoder/json_transcoder_filter.cc#L430

Example:

grpcMethodA
    SetHeader("xyz", "123")
    return errorStatus(3), errorMessage("hello, error message")

< HTTP/2 400
< content-type: application/json
< xyz: 123
< x-envoy-upstream-service-time: 1
< grpc-status: 3
< grpc-message: hello, error message
< content-length: 0
< date: Tue, 27 Aug 2019 13:02:42 GMT
< server: istio-envoy

grpcMethodB
    SetHeader("xyz", "123")
    return errorStatus(1024), errorMessage("hello, error message")

< HTTP/2 503
< content-type: application/json
< xyz: 123
< x-envoy-upstream-service-time: 7
< grpc-message: hello, error message
< content-length: 0
< date: Tue, 27 Aug 2019 13:04:04 GMT
< server: istio-envoy

But when using Trailer, when StatusOK(0), trailer related header is missing, it only shows when error accurred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions