commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (VALIDATOR-318) URLs with a hostname containing an underscore are not validated
Date Mon, 18 Apr 2016 15:55:25 GMT

     [ https://issues.apache.org/jira/browse/VALIDATOR-318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved VALIDATOR-318.
----------------------------
    Resolution: Duplicate

> URLs with a hostname containing an underscore are not validated
> ---------------------------------------------------------------
>
>                 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 was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message