[
https://issues.apache.org/jira/browse/VALIDATOR-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13622108#comment-13622108
]
Rafał Figas commented on VALIDATOR-318:
---------------------------------------
Or simply there is a bunch of people who simply don't care about
specifications... Not the first time and probably not the last one...
There are lots of suggestions (including IBM documentations) over Internet,
that in general underscore is often handled, however it is not advised to use
it as it may cause unexpected problems...
The only reasonable solution that comes to my mind is to add a flag to
validator (off by default) which allows to turn on underscore handling.
Finally, there are customers who do not care about specifications as well, and
they want to use underscored host names, just because it is possible to create
them.
> isValid return false for valid URL
> ----------------------------------
>
> Key: VALIDATOR-318
> URL: https://issues.apache.org/jira/browse/VALIDATOR-318
> Project: Commons Validator
> Issue Type: Bug
> Affects Versions: 1.3.1 Release, 1.4.0 Release
> Reporter: Rafał Figas
>
> isValid returns false for following URL:
> http://www.nasza_sp77.republika.pl/
> which seems to be perfectly legal according to RFC:
> http://tools.ietf.org/html/rfc3986#section-2.3
> And a discussions here:
> http://stackoverflow.com/questions/2180465/can-someone-have-a-subdomain-with-an-underscore-in-it
> http://stackoverflow.com/questions/10959757/the-use-of-the-underscore-in-host-names
> Test code:
> {code}
> String schemes[] = { "http", "https" };
> UrlValidator validator = new UrlValidator(schemes, UrlValidator.NO_FRAGMENTS);
> return validator.isValid("http://www.nasza_sp77.republika.pl/");
> {code}
> This is somewhat similar to VALIDATOR-204, but that was for path part of URL
> and this one is for underscore in hostname.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira