2006/unicorn/src/org/w3c/unicorn/action ObserveAction.java,1.22,1.23

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv7366/src/org/w3c/unicorn/action

Modified Files:
	ObserveAction.java 
Log Message:
added error if https protocol is used

Index: ObserveAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- ObserveAction.java	8 Sep 2009 15:41:03 -0000	1.22
+++ ObserveAction.java	8 Sep 2009 15:46:44 -0000	1.23
@@ -144,11 +144,16 @@
 					continue;
 				} else if (paramName.equals("uri")) {
 					logger.debug("Uri parameter: " + key + " - " + (String) reqParams.get(key));
-					aUnicornCall.setEnumInputMethod(EnumInputMethod.URI);
 					String uri = (String) reqParams.get(key);
-					if (uri.length() < 7 || !uri.substring(0, 7).equals("http://")) {
+					if (uri.startsWith("https://")) {
+						Message mess = new Message(Message.Level.ERROR, "Unicorn does not support https protocol for the moment.", null);
+						createError(req, resp, mess, mapOfSpecificParameter, mapOfOutputParameter);
+						return;
+					}
+					if (!uri.startsWith("http://")) {
 						uri = "http://" + uri;
 					}
+					aUnicornCall.setEnumInputMethod(EnumInputMethod.URI);
 					aUnicornCall.setDocumentName(uri);
 					aUnicornCall.setInputParameterValue(uri);
 				} else if (paramName.equals("text")) {

Received on Tuesday, 8 September 2009 15:46:56 UTC