Skip to content

feat: add strict version of uri parsing #689

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

Closed
wants to merge 1 commit into from

Conversation

dswij
Copy link
Member

@dswij dswij commented Mar 16, 2024

This PR adds a strict version of uri parsing to disallow {, } and ".

See hyperium/hyper#3594

@dswij dswij requested a review from seanmonstar March 16, 2024 17:41
@seanmonstar
Copy link
Member

I don't think this is a way to go. Part of the point of a specific type is knowing that once parsed, it matches a certain set of characters. Having different constructors could mean two different instances could have separate character sets.

This differs in practice from how HeaderName::from_lowercase(), because all the constructors still force to lowercase, that one constructor just adds an additional validation, instead of coercing to the same character set.

@seanmonstar seanmonstar closed this Mar 3, 2025
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.

2 participants