-
Bug
-
Resolution: Fixed
-
P3
-
1.0.2
-
ventura
-
generic
-
generic
Name: krC82822 Date: 02/07/2001
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
The problem happens when using HTTPS with proxy server. JSSE always returns the
error
"java.io.IOException: Unable to tunnel through 192.168.1.250:8080. Proxy
returns "HTTP/1.1 200 Connection established"
even thought the connection was established successfully with the proxy server.
I found that the com.sun.net.ssl.internal.www.protocol.https.HttpsClient class
has the following checking in it's "a" method which may be the cause of the
problem:
private void a(Socket Socket1, String String2, int int3)
throws IOException
{
.......
if( !( String14.startsWith( "HTTP/1.0 200" ) ) )
throw new IOException( "Unable to tunnel through " + h + ":" + i
+ ". Proxy returns \"" + String14 + "\"" );
else
return;
}
The above method hardcoded the "HTTP/1.0 200" for checking of successful
connection. For instance, some proxy servers may return something
like "HTTP/1.1 200" (two spaces in the middle) but not exactly "HTTP/1.0 200".
However, the JSSE logic will throw an exception.
(Review ID: 114265)
======================================================================
- duplicates
-
JDK-4488851 RFC2616: Microsoft Proxy and Sun can't communicate when using https
- Closed
-
JDK-4513875 HTTPS Tunneling broken when server does not return HTTP/1.0 200
- Closed