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

HttpURLConnection writeRequests retry handles proxy incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0_01
    • 1.4.0
    • core-libs
    • None
    • 01
    • generic
    • generic
    • Verified

        HttpURLConnection will call writeRequests() to actually send out the HTTP request. If certain condition triggers a write error inside writeRequests(), one retry will happen. For this retry, the connection will be disconnected and we would retry the same request after setting up a new connection (through setNewClient call). However, setNewClient would ignore any proxy settings. what should be called is if proxy is set, then call setProxiedClient.

        This bug was exposed by a J2EE soap application when trying to add items to a UDDI server.

        ===========

        Note, this has affected JSSE & https. Web services
        ran into this bug when doing UDDI publishing via https.

        A first URL connection gets the
        auth token, a second URL connection publishes the data.

        The second connection was creating this
        certain condition, and the second connection
        tried to establish a new connection without
        setting up the proxy correctly.

        Thus the client program thought it was already tunneled,
        and sent a Client Hello. This was an "unrecognised command"
        to the proxy. The SSL client was trying to read the
        following as a "server hello", which obviously would fail.

        HTTP/1.0 Bad Request
        Server: Netscape-Proxy/3.52

        Your browser sent a message this server could not understand.

        ###@###.### 2002-03-14

              ywangsunw Yingxian Wang (Inactive)
              ywangsunw Yingxian Wang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: