commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30686] - [validator] UrlValidator fails http://www.google.com
Date Wed, 18 Aug 2004 21:11:02 GMT
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


Mime
View raw message