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

isUrl - Host and scheme should be case insensitive #887

Closed
felpel opened this issue Aug 31, 2018 · 1 comment
Closed

isUrl - Host and scheme should be case insensitive #887

felpel opened this issue Aug 31, 2018 · 1 comment

Comments

@felpel
Copy link

felpel commented Aug 31, 2018

Given I use https://www.yahoo.com, HtTPs://WwW.YaHoO.cOm or HTTPS://WWW.YAHOO.COM, it would still be resolved to https://www.yahoo.com.

The user tried to type HTTPS://TEST.COM and was given an error by the validator with the default options, even though https is valid by default. With https://TEST.COM, it was no longer failing the validation.

Following this article by IBM,

The scheme and host components of a URL are not defined as case-sensitive, but the path and query string are case-sensitive. Typically, the whole URL is specified in lowercase.

the library could lower the case of scheme and host components in order to prevent false negatives.

@chriso chriso closed this as completed in 6ce3060 Sep 1, 2018
@chriso
Copy link
Collaborator

chriso commented Sep 1, 2018

Thanks. This looks like a regression introduced by f9be99f.

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

2 participants