Skip to content

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