You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/08/18 23:11:02 UTC

DO NOT REPLY [Bug 30686] - [validator] UrlValidator fails http://www.google.com

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30686>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30686

[validator] UrlValidator fails http://www.google.com





------- Additional Comments From tim.reilly@consultant.com  2004-08-18 21:11 -------
Seems the issue is isValidPath("") returns false.

-From rfc2396
   The authority component is preceded by a double slash "//" and is
   terminated by the next slash "/", question-mark "?",or by the end of
   the URI.

To accomodate "" as valid the forthcoming patches change the regular expression 
to allow zero or more:

private static final String PATH_PATTERN =
-            "/^(/[-a-zA-Z0-9_:@&?=+,.!/~*'%$]*)$/";
+            "/^(/[-a-zA-Z0-9_:@&?=+,.!/~*'%$]*)*$/";

Also changes to unit test data expects true when path = "" in both default 
fragement and no fragement options

Please verify (read scrutinize) ;-)

Thanks
-TR

PS - I didn't see the js implementation for UrlValidator. If I missed it sorry -
 if changes accepted though I assume it would need the change as well?

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org