Skip to content

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

@jonathanstrong

Description

@jonathanstrong

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions