Skip to content
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

fix(tonic-web): fix panic caused in trailer parsing when there is more than one trailer #1880

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

zakhenry
Copy link
Contributor

Motivation

Attempting to parse a real grpc-web message response from an envoy server that added a few other trailers resulted in a panic

Solution

Root issue was a simple failure to advance the cursor in a buffer read. It happened to work for the first trailer so this wasn't already caught in tests

tonic-web/src/call.rs Outdated Show resolved Hide resolved
@zakhenry zakhenry force-pushed the fix/grpc-web-trailer-parsing branch from af26d0d to aaa1bb5 Compare August 21, 2024 07:56
Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense, but the code is a little hard to read.

tonic-web/src/call.rs Show resolved Hide resolved
tonic-web/src/call.rs Show resolved Hide resolved
@djc djc added this pull request to the merge queue Aug 22, 2024
Merged via the queue into hyperium:master with commit 46d8c2d Aug 22, 2024
16 checks passed
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.

3 participants