when iam using the HttpsURLConnection class to connect the secure site( Urgent Pls help me )
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kubendran_muthukumar
Posted On:   Tuesday, December 16, 2003 11:52 PM

Method Not Allowed when iam using the HttpsURLConnection class to connect the secure site like https://www.verisign.com through proxy using POST method it displays the Html page like "Method not allowed" but the same code for GET method is working fine... my code is URL myURL = new URL(null, "https://www.verisign.com/nds/naming/idn/?sl=070405", new com.sun.net.ssl.internal.www.protocol.https.Handler());; //URLConnection myConnection = myURL.openConnection(); httpsURLConnection = (com.sun.net.ssl.HttpsURLConnection)myURL.openConnection(); if (httpsURLConnection instanceof com.sun.net.ssl.HttpsURLConnection) { httpsURLConnection.setSSLSocketFactory(new SSLTunnelSocketFactory(System.g   More>>
Method Not Allowed

when iam using the HttpsURLConnection class to connect the secure site like https://www.verisign.com through proxy using POST method it displays the Html page like "Method not allowed" but the same code for GET method is working fine...

my code is

URL myURL = new URL(null, "https://www.verisign.com/nds/naming/idn/?sl=070405", new com.sun.net.ssl.internal.www.protocol.https.Handler());;
//URLConnection myConnection = myURL.openConnection();
httpsURLConnection = (com.sun.net.ssl.HttpsURLConnection)myURL.openConnection();
if (httpsURLConnection instanceof com.sun.net.ssl.HttpsURLConnection) {
httpsURLConnection.setSSLSocketFactory(new SSLTunnelSocketFactory(System.getProperty("proxyHost"), System.getProperty("proxyPort")));
}
httpsURLConnection.setUseCaches(false);
httpsURLConnection.setRequestProperty("Content-Type","text/html; charset=UTF-8");
httpsURLConnection.setDoInput(true);
httpsURLConnection.setDoOutput(true);
httpsURLConnection.setRequestMethod("GET");
System.out.println("Request method =" + httpsURLConnection.getRequestMethod());

the above code is working fine
but when i use the POST instead of GET it connects the site and handshaking every thing is working file but it reads
like this




Method Not Allowed



An error has occurred.




can any one help me please

Thanks
MuthuKumar    <<Less

Re: when iam using the HttpsURLConnection class to connect the secure site( Urgent Pls help me )

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, December 17, 2003 06:28 AM

...using POST method it displays the Html page like "Method not allowed" ...


Sounds like your verisign URL just doesn't accept POST requests?

About | Sitemap | Contact