Skip to content

client: surface truncated Connect streaming responses as an error #140

@iainmcgin

Description

@iainmcgin

For Connect-protocol streaming responses, ServerStream treats the body ending without an END_STREAM envelope as a clean end of stream: message() returns Ok(None) and error() is None. A response that is cut off mid-stream (connection drop, misbehaving intermediary) is therefore indistinguishable from a complete one. The gRPC and gRPC-Web paths already surface missing trailers as an error, and connect-go reports a missing END_STREAM as an error as well.

Proposed work: when the body ends while the protocol is Connect and no END_STREAM envelope has been seen, surface an error (e.g. unavailable or internal, matching connect-go's choice) instead of a clean end, with a regression test for the truncated-response case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions