cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean Bogner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-3112) Further problem with cookies in Jax-RS (similar to closed issue 3035)
Date Tue, 15 Feb 2011 09:13:58 GMT

    [ https://issues.apache.org/jira/browse/CXF-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994709#comment-12994709
] 

Jean Bogner commented on CXF-3112:
----------------------------------

We found another issue regarding the correct splitting of cookies.  8-)
The "splitPossible" check of the "AbstractClient"-Class must be placed inside the for loop
!!
Please have a look at the following 3 lines of code with the corrected:

...
for (String val : entry.getValue()) {
  boolean splitPossible = !(HttpHeaders.SET_COOKIE.equalsIgnoreCase(entry.getKey()) 
  && val.toUpperCase().contains(HttpHeaders.EXPIRES.toUpperCase()));
...

thanks and greetings
jean


> Further problem with cookies in Jax-RS (similar to closed issue 3035)
> ---------------------------------------------------------------------
>
>                 Key: CXF-3112
>                 URL: https://issues.apache.org/jira/browse/CXF-3112
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.3.0, 2.2.11
>            Reporter: David Hagar
>            Assignee: Sergey Beryozkin
>             Fix For: 2.2.12, 2.3.1, 2.4
>
>         Attachments: 3112_patch.diff
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message