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

HttpURLConnection writeRequests retry handles proxy incorrectly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0_01
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      01
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        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

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: