W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2009

2006/unicorn/src/org/w3c/unicorn/action ObserveAction.java,1.27,1.28

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 14 Sep 2009 12:15:44 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MnATA-00087w-P6@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv31226/src/org/w3c/unicorn/action

Modified Files:
	ObserveAction.java 
Log Message:
changed url verification regex
+ removed unsupported protocols

Index: ObserveAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- ObserveAction.java	14 Sep 2009 10:19:03 -0000	1.27
+++ ObserveAction.java	14 Sep 2009 12:15:42 -0000	1.28
@@ -163,7 +163,8 @@
 						createError(req, resp, reqParams, mess, mapOfSpecificParameter, mapOfOutputParameter);
 						return;
 					}
-					Pattern urlPattern = Pattern.compile("^(https?|ftp|rmtp|mms)://([A-Z0-9][A-Z0-9_-]*)(:(\\d+))?([/#]\\p{ASCII}*)?", Pattern.CASE_INSENSITIVE);
+					// To allow other protocols change (https?) in (https?|ftp|rmtp) for example
+					Pattern urlPattern = Pattern.compile("^(https?)://([A-Z0-9][A-Z0-9_-]*)(\\.[A-Z0-9][A-Z0-9_-]*)*(:(\\d+))?([/#]\\p{ASCII}*)?", Pattern.CASE_INSENSITIVE);
 					if (!urlPattern.matcher(uri).matches()) {
 						if (uri.equals(""))
 							continue;
Received on Monday, 14 September 2009 12:15:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:14 GMT