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

Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.10
    • 2.3, 2.2.11
    • JAX-RS
    • None
    • any

    Description

      If you try wget -S www.walmart.com you can see that our tomcat server returns a header which contains "Set-Cookie:" multiple times:

      jfk@preding:/tmp$ wget -S www.walmart.com
      -2010-10-04 16:44:22- http://www.walmart.com/
      Resolving www.walmart.com... 161.170.244.20
      Connecting to www.walmart.com|161.170.244.20|:80... connected.
      HTTP request sent, awaiting response...
      HTTP/1.1 200 OK
      Date: Mon, 04 Oct 2010 23:44:22 GMT
      Server: Apache/2.2.15
      Via: HTTP/1.0 nw106 (nw106_6799663104_56977920)
      Set-Cookie: cef.env=PROD; Domain=.walmart.com; Path=/
      Set-Cookie: com.wm.visitor=10789493347; Domain=.walmart.com; Expires=Thu, 01-Oct-2020 23:44:22 GMT; Path=/
      Set-Cookie: spcf.backup="|com.wm.visitor:10789493347|"; Version=1; Domain=.walmart.com; Path=/
      Set-Cookie: com.wm.anoncart=107894933471602436; Domain=.walmart.com; Expires=Thu, 01-Oct-2020 23:44:22 GMT; Path=/
      Set-Cookie: spcf.backup="|com.wm.anoncart:107894933471602436|:|com.wm.visitor:10789493347|"; Version=1; Domain=.walmart.com; Path=/
      Set-Cookie: WMSessionID=0000000456ff25583fcc12af37682dc03fb73f1623a00e60_1286235862759_SSL206_10-15-43-137_1286235862759_10.9_N_; Domain=.walmart.com; Path=/
      Set-Cookie: cef.env=PROD+B+HDY%3Fcat%3D3891+C+; Domain=.walmart.com; Path=/
      Set-Cookie: com.wm.reflector="reflectorid:0000000000000000000000@lastupd:1286235862786@firstcreate:1286235862786"; Version=1; Domain=.walmart.com; Path=/
      Cache-Control: private
      Cache-Control: max-age=900
      Last-Modified: Mon, 04 Oct 2010 23:44:22 GMT
      Expires: Mon, 04 Oct 2010 23:44:22 GMT
      Set-Cookie: prefses=NAVPATH~10DcurrentDS0A0|1A0; Domain=.walmart.com; Path=/
      Vary: Accept-Encoding
      Connection: close
      Content-Type: text/html;ISO-8859-1;charset=ISO-8859-1
      Set-Cookie: NSC_xxx.xbmnbsu.dpn-mc=445c13ab3660;path=/
      Length: unspecified [text/html]
      Saving to: `index.html'

      [ <=> ] 83,335 132K/s in 0.6s

      2010-10-04 16:44:23 (132 KB/s) - `index.html' saved [83335]

      Unfortunately, everything but the first "Set-Cookie" is stripped by line 341 in org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange)

      Instead of the current code, which only uses the first value returned by getValue(), it would be great if the next version could iterate through every item in the list.

      Attachments

        1. cxf-rt-frontend-jaxrs-2.2.10.1.patch
          0.9 kB
          Joachim F. Kainz

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            jolira Joachim F. Kainz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: