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

document that inputs are case-sensitive or convert to lowercase #18

Open
jonathanstrong opened this issue Dec 15, 2022 · 0 comments
Open

Comments

@jonathanstrong
Copy link

I was somewhat surprised by this behavior:

$ evcxr
>> addr::parse_domain_name("GOOGLE.COM").unwrap().is_icann()
false
>> addr::parse_domain_name("google.com").unwrap().is_icann()
true

It might be a good idea to deal with input case in a more explicit way, either by documenting that the validation is case-sensitive, converting the inputs internally, or using case-insensitive comparisons.

I expect there is some reason for this (probably defined in some RFC about domain names) that would seem obvious to someone who knows, but my expectation as a new user of the library is that a parse_domain_name function would deal with the casing of the input somehow.

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

No branches or pull requests

1 participant