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

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 UTC