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

URL.openConnection() should take a CookieHandler parameter

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • 6u3
    • core-libs
    • None
    • Cause Known
    • generic
    • solaris_nevada

      There are currently two variants of URL.openConnection:

          URLConnection openConnection()
          URLConnection openConnection(Proxy proxy)

      There should be a third variant:

          URLConnection openConnection(Proxy proxy, CookieHandler cookieHandler)

      At the moment is is only possible to set the CookieHandler globally via CookieHandler.setDefault(), which means that if you want to have multiple cookie containers (e.g. if you want to simulate multiple browsers for the purposes of load testing), you need to do all the cookie management yourself. Most of the code needed
      is already in URLConnection and its associated classes, all that is required is the ability to set a per-URLConnection CookieHandler.

            Unassigned Unassigned
            alanbur Alan Burlison
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: