Skip to content

fix(codec): Fix streaming reponses w/ many status#689

Merged
LucioFranco merged 1 commit intomasterfrom
lucio/rst
Jul 1, 2021
Merged

fix(codec): Fix streaming reponses w/ many status#689
LucioFranco merged 1 commit intomasterfrom
lucio/rst

Conversation

@LucioFranco
Copy link
Member

This fixes a bug found in #681 where sending a second status code in a stream would return an Unknown status code w/ the message that there was no grpc-header. From the grpc-h2 spec after the first status code returned in a streaming response we must end the stream. This change introduces the behavior with infer_grpc_status from trailers to map a http::StatusCode::OK to a empty/ended trailer stream.

Closes #681

@LucioFranco LucioFranco merged commit 737ace3 into master Jul 1, 2021
@LucioFranco LucioFranco deleted the lucio/rst branch July 1, 2021 14:25
alexrudy added a commit to alexrudy/tonic that referenced this pull request Apr 16, 2024
According to [hyperium#689](hyperium#689) streams should end after the first error. Therefore, when we find an error in the response step, discard the trailers so that the stream ends.
alexrudy added a commit to alexrudy/tonic that referenced this pull request May 20, 2024
According to [hyperium#689](hyperium#689) streams should end after the first error. Therefore, when we find an error in the response step, discard the trailers so that the stream ends.
alexrudy added a commit to alexrudy/tonic that referenced this pull request May 21, 2024
According to [hyperium#689](hyperium#689) streams should end after the first error. Therefore, when we find an error in the response step, discard the trailers so that the stream ends.
alexrudy added a commit to alexrudy/tonic that referenced this pull request May 26, 2024
According to [hyperium#689](hyperium#689) streams should end after the first error. Therefore, when we find an error in the response step, discard the trailers so that the stream ends.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tonic client stuck in infinite error status message loop (server side streaming)

3 participants