UrlValidator fail when path contains "(" / ")"
----------------------------------------------
Key: VALIDATOR-218
URL: http://issues.apache.org/jira/browse/VALIDATOR-218
Project: Commons Validator
Issue Type: Bug
Affects Versions: 1.3.1 Release
Environment: JDK 1.5, Linux
Reporter: Stephen Chu
for validating the URL "http://somewhere.com/pathxyz/file(1).html", it returns
false.
According to the RFC,
uric = reserved | unreserved | escaped
reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
"$" | ","
unreserved = alphanum | mark
mark = "-" | "_" | "." | "!" | "~" | "*" | "'" |
"(" | ")"
"(", ")" belongs to mark and is a valid part of uric.
Test case:
UrlValidator validator = new UrlValidator({"http","https"},
UrlValidator.ALLOW_2_SLASHES);
validator.isValid("http://somewhere.com/pathxyz/file(1).html");
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]