dcsimg
failure in opening https url connection
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, April 5, 2001 09:46 AM

IOExceptionjava.io.IOException: Unable to tunnel through proxy:80. Proxy return s "HTTP/1.1 200 Connection established" is encountered when I run the code below. public static void main (String args[ ]) { Properties systemProperties = System.getProperties(); System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol"); Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); systemProperties.put("https.proxySet","true"); systemProperties.put("https.proxyHost","proxy"); systemProperties.put("https.proxyPort","80");    More>>

IOExceptionjava.io.IOException: Unable to tunnel through proxy:80. Proxy return
s "HTTP/1.1 200 Connection established" is encountered when I run the code below.


public static void main (String args[ ])
{


Properties systemProperties = System.getProperties();
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());



systemProperties.put("https.proxySet","true");
systemProperties.put("https.proxyHost","proxy");
systemProperties.put("https.proxyPort","80");

System.setProperties(systemProperties);

URL url = new URL("https://quotes.bennetts.co.uk/formula/");

URLConnection conn = url.openConnection();
conn.connect();


}


Thanks in advance.

   <<Less

Re: failure in opening https url connection

Posted By:   Tim_Rohaly  
Posted On:   Thursday, June 7, 2001 05:20 PM

First, there is no property http.proxySet -
just delete the line in your code where you try to
set that.


Second, the error message is telling you that
it can't tunnel using a proxy server on port
80 of the host "proxy". Try using a fully qualified
host name or an IP address instead, and make sure
the proxy is running. Try examing the logs on the
proxy side to make sure the connection is tried.

About | Sitemap | Contact