- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 02 Oct 2009 11:48:12 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/input In directory hutz:/tmp/cvs-serv6113/src/org/w3c/unicorn/input Modified Files: URIInputParameter.java Log Message: explicit implementation of HttpURLConnection Index: URIInputParameter.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/input/URIInputParameter.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- URIInputParameter.java 2 Oct 2009 11:18:30 -0000 1.8 +++ URIInputParameter.java 2 Oct 2009 11:48:10 -0000 1.9 @@ -2,7 +2,8 @@ import java.io.IOException; import java.net.ConnectException; -import java.net.HttpURLConnection; +//import java.net.HttpURLConnection; +import sun.net.www.protocol.http.HttpURLConnection; import java.net.MalformedURLException; import java.net.SocketTimeoutException; import java.net.URL; @@ -51,8 +52,9 @@ if (!docUrl.getProtocol().equals("http") && !docUrl.getProtocol().equals("https")) throw new UnicornException(Message.Level.ERROR, "$message_unsupported_protocol " + docUrl.getProtocol(), null); HttpURLConnection con = (HttpURLConnection) docUrl.openConnection(); + System.out.println(con.getClass()); con.setConnectTimeout(connectTimeOut); - ((URLConnection) con).connect(); + con.connect(); int responseCode = con.getResponseCode(); switch (responseCode) { case HttpURLConnection.HTTP_UNAUTHORIZED:
Received on Friday, 2 October 2009 11:48:16 UTC