Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4413069

Incorrect checking of proxy server response

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • unknown
    • 1.0.2
    • security-libs
    • 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)
      ======================================================================

            jhangalsunw Jayalaxmi Hangal (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: