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

jdk.internal.net.http.PlainProxyConnection is never reused by HttpClient

XMLWordPrintable

    • b14
    • x86_64
    • windows_10

      A DESCRIPTION OF THE PROBLEM :
      Due to the way the PlainProxyConnection creates its CacheKey (new ConnectionPool.CacheKey(null, address), where address is the proxy's address), the Connection will never be retrieved from the HttpClient's ConnectionPool, as HttpConnection.getConnection() is never called with addr == null.

      As a consequence of this behaviour, it is impossible to implement NTLM proxy authentication client side.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Send a number of requests through a proxy from the same HttpClient, sequentially.
      Dump the network traffic.



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      All requests are sent using the same port, i.e. the same connection.
      ACTUAL -
      For each request, a new socket is opened using the next port in queue.

      CUSTOMER SUBMITTED WORKAROUND :
      None.

      FREQUENCY : always


            dfuchs Daniel Fuchs
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: