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 parsing of long host with no scheme #351

Merged
merged 4 commits into from Nov 26, 2019
Merged

Fix parsing of long host with no scheme #351

merged 4 commits into from Nov 26, 2019

Conversation

avitex
Copy link
Contributor

@avitex avitex commented Nov 12, 2019

No description provided.

This change fixes an issue where an URI with no scheme, a host
part with a length greater than the max for a scheme, while only
consisting of valid characters for a scheme would fail to parse.

Rather than assuming the string being parsed is meant to contain
a scheme and returning an error if the max length for a scheme is
met, we instead extract the scheme part if it exists and validate
its length.

The tradeoff is worse performance in the error case of a scheme
that is too long.
@seanmonstar seanmonstar merged commit d3cae7c into hyperium:master Nov 26, 2019
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.

None yet

2 participants