Skip to content

classification of "trailers-only" responses for gRPC and gRPC-Web is not quite right #268

@jhump

Description

@jhump

The logic in the client looks for a "grpc-status" key in response headers to decide if the response is a "trailers-only" response. But the gRPC spec classifies this more rigorously as a headers frame that terminates the HTTP/2 stream. Expanding this to HTTP 1.1, it would be a response that has headers but no response body and no trailers. The current mechanism would misinterpret a response as "trailers-only" if it had an erroneous "grpc-status" header key, even if the response had both a response body and subsequent trailers. To be more compliant with the spec, this client should only consider a response to be "trailers-only" when it observes the end of the response and there was no body and were no trailers. Only then should it query for a "grpc-status" key from the headers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions