2006/unicorn/src/org/w3c/unicorn/input URIInputParameter.java,1.18,1.19

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

Modified Files:
	URIInputParameter.java 
Log Message:
fixed: unicorn does not fetch a document to check its availability anymore (uses HEAD request instead)

Index: URIInputParameter.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/input/URIInputParameter.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- URIInputParameter.java	18 May 2010 11:13:37 -0000	1.18
+++ URIInputParameter.java	21 May 2010 18:02:26 -0000	1.19
@@ -17,6 +17,7 @@
 import javax.net.ssl.HttpsURLConnection;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLHandshakeException;
 import javax.net.ssl.TrustManager;
 
 import org.w3c.unicorn.contract.EnumInputMethod;
@@ -83,6 +84,7 @@
 			
 			HttpURLConnection con = (HttpURLConnection) docUrl.openConnection();
 			con.setConnectTimeout(connectTimeOut);
+			con.setRequestMethod("HEAD");
 			try {
 				con.connect();
 			} catch (SSLException e) {
@@ -117,6 +119,8 @@
 			} else {
 				throw new UnicornException(new Message(e));
 			}
+		} catch (SSLHandshakeException e) {
+			throw new UnicornException(Message.ERROR, "$message_ssl_exception");
 		} catch (IOException e) {
 			throw new UnicornException(new Message(e));
 		}

Received on Friday, 21 May 2010 18:02:30 UTC