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

Update parseTrailer function to support empty trailers & trailers with colon in content #168

Merged
merged 3 commits into from
Oct 4, 2021

Conversation

wielski
Copy link
Contributor

@wielski wielski commented Oct 2, 2021

When message ends with 128, 0, 0, 0, 0 and trailerData is empty, splitting it by \r\n resulting array contains one empty string.
This causes error:

RpcError: Cannot read property 'trim' of undefined

Also, if trailer has colon in content it stripping because of limit. See #166

This PR fixes this bugs, according to grpc-web protocol.

Co-authored-by: James Wyatt Cready-Pyle <[email protected]>
Copy link
Owner

@timostamm timostamm left a comment

Choose a reason for hiding this comment

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

Thanks for this fix, LGTM!

@timostamm timostamm merged commit 1209841 into timostamm:master Oct 4, 2021
@timostamm
Copy link
Owner

Released in v2.0.7

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