Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3112

Further problem with cookies in Jax-RS (similar to closed issue 3035)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3, 2.2.11
    • 2.2.12, 2.3.1, 2.4
    • JAX-RS
    • None

    Description

      Prior to version 2.2.11, multiple cookies were not handled properly by the method org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) – this was resolved for some cookies, but it still breaks for others. Specifically, any cookie that contains an "Expires" field now gets split into two objects by the aforementioned method.

      For example, if the header is:

      Set-Cookie: com.wm.visitor=10789493347; Domain=.walmart.com; Expires=Thu, 01-Oct-2020 23:44:22 GMT; Path=/

      Then response.getMetadata().get("Set-Cookie"); will return an array of length 2, with values = {" com.wm.visitor=10789493347; Domain=.walmart.com; Expires=Thu", "01-Oct-2020 23:44:22 GMT; Path=/"

      I'm pretty sure this is a conflict of the code looking for date related headers conflicting with the code looking for cookie related headers.

      Attachments

        1. 3112_patch.diff
          5 kB
          David Hagar

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            david.hagar David Hagar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: