You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "yuhang (Created) (JIRA)" <ji...@apache.org> on 2011/10/27 11:12:32 UTC
[jira] [Created] (VALIDATOR-298) URL with parenthese is not valid
URL with parenthese is not valid
--------------------------------
Key: VALIDATOR-298
URL: https://issues.apache.org/jira/browse/VALIDATOR-298
Project: Commons Validator
Issue Type: Bug
Reporter: yuhang
The class org.apache.commons.validator.UrlValidator rejects certain valid URL
According to RFC1738:
-------------
HTTP
httpurl = "http://" hostport [ "/" hpath [ "?" search ]]
hpath = hsegment *[ "/" hsegment ]
hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
search = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
-------------
the httpurl is allowed to contain the parenthese("("|")").
But the urlvalidator reject it.
e.g.
url: www.google.com/abv(de)
urlvalidator.isValid(url) = false;
but it's a valid url,in fact.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (VALIDATOR-298) URL with parenthese is not valid
Posted by "Nick Burch (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VALIDATOR-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nick Burch resolved VALIDATOR-298.
----------------------------------
Resolution: Invalid
> URL with parenthese is not valid
> --------------------------------
>
> Key: VALIDATOR-298
> URL: https://issues.apache.org/jira/browse/VALIDATOR-298
> Project: Commons Validator
> Issue Type: Bug
> Reporter: yuhang
>
> The class org.apache.commons.validator.UrlValidator rejects certain valid URL
> According to RFC1738:
> -------------
> HTTP
> httpurl = "http://" hostport [ "/" hpath [ "?" search ]]
> hpath = hsegment *[ "/" hsegment ]
> hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
> search = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
> -------------
> the httpurl is allowed to contain the parenthese("("|")").
> But the urlvalidator reject it.
> e.g.
> url: www.google.com/abv(de)
> urlvalidator.isValid(url) = false;
> but it's a valid url,in fact.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VALIDATOR-298) URL with parenthese is not valid
Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VALIDATOR-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154813#comment-13154813 ]
Sebb commented on VALIDATOR-298:
--------------------------------
Note: the current RFC for URIs is RFC3986 [1]
[1] http://tools.ietf.org/rfc/rfc3986.txt
> URL with parenthese is not valid
> --------------------------------
>
> Key: VALIDATOR-298
> URL: https://issues.apache.org/jira/browse/VALIDATOR-298
> Project: Commons Validator
> Issue Type: Bug
> Reporter: yuhang
>
> The class org.apache.commons.validator.UrlValidator rejects certain valid URL
> According to RFC1738:
> -------------
> HTTP
> httpurl = "http://" hostport [ "/" hpath [ "?" search ]]
> hpath = hsegment *[ "/" hsegment ]
> hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
> search = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
> -------------
> the httpurl is allowed to contain the parenthese("("|")").
> But the urlvalidator reject it.
> e.g.
> url: www.google.com/abv(de)
> urlvalidator.isValid(url) = false;
> but it's a valid url,in fact.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VALIDATOR-298) URL with parenthese is not valid
Posted by "Erhan Bagdemir (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VALIDATOR-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154467#comment-13154467 ]
Erhan Bagdemir commented on VALIDATOR-298:
------------------------------------------
Try, "http://www.google.com/abv(de)" instead.
Associated test case is in UrlValidatorTest:140
public void testValidator218() {
UrlValidator validator = new UrlValidator(UrlValidator.ALLOW_2_SLASHES);
assertTrue("parentheses should be valid in URLs",
validator.isValid("http://somewhere.com/pathxyz/file(1).html"));
}
The unit test could run clearly with a valid scheme in a test url, such as "http://", "https://" or "ftp://".
> URL with parenthese is not valid
> --------------------------------
>
> Key: VALIDATOR-298
> URL: https://issues.apache.org/jira/browse/VALIDATOR-298
> Project: Commons Validator
> Issue Type: Bug
> Reporter: yuhang
>
> The class org.apache.commons.validator.UrlValidator rejects certain valid URL
> According to RFC1738:
> -------------
> HTTP
> httpurl = "http://" hostport [ "/" hpath [ "?" search ]]
> hpath = hsegment *[ "/" hsegment ]
> hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
> search = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
> -------------
> the httpurl is allowed to contain the parenthese("("|")").
> But the urlvalidator reject it.
> e.g.
> url: www.google.com/abv(de)
> urlvalidator.isValid(url) = false;
> but it's a valid url,in fact.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira