You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Joachim F. Kainz (JIRA)" <ji...@apache.org> on 2010/10/05 01:48:32 UTC
[jira] Created: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
--------------------------------------------------------------------------------------------------------------------------
Key: CXF-3035
URL: https://issues.apache.org/jira/browse/CXF-3035
Project: CXF
Issue Type: Bug
Components: Core
Affects Versions: 2.2.10
Environment: any
Reporter: Joachim F. Kainz
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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Posted by "Joachim F. Kainz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joachim F. Kainz updated CXF-3035:
----------------------------------
Comment: was deleted
(was: Index: src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
===================================================================
--- src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java (revision 1004511)
+++ src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java (working copy)
@@ -338,11 +338,13 @@
if (HttpUtils.isDateRelatedHeader(entry.getKey())) {
currentResponseBuilder.header(entry.getKey(), entry.getValue());
} else if (entry.getValue().size() > 0) {
- String[] values = entry.getValue().get(0).split(",");
- for (String s : values) {
- String theValue = s.trim();
- if (theValue.length() > 0) {
- currentResponseBuilder.header(entry.getKey(), theValue);
+ for(String val : entry.getValue()) {
+ String[] values = val.split(",");
+ for (String s : values) {
+ String theValue = s.trim();
+ if (theValue.length() > 0) {
+ currentResponseBuilder.header(entry.getKey(), theValue);
+ }
}
}
}
)
> Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-3035
> URL: https://issues.apache.org/jira/browse/CXF-3035
> Project: CXF
> Issue Type: Bug
> Components: WS-* Components
> Affects Versions: 2.2.10
> Environment: any
> Reporter: Joachim F. Kainz
> Attachments: cxf-rt-frontend-jaxrs-2.2.11-SNAPSHOT.patch
>
>
> 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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Posted by "Joachim F. Kainz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918334#action_12918334 ]
Joachim F. Kainz commented on CXF-3035:
---------------------------------------
Sergey,
Yes, this will work. Thank you for your help.
Best regards,
Joachim
> Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-3035
> URL: https://issues.apache.org/jira/browse/CXF-3035
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.2.10
> Environment: any
> Reporter: Joachim F. Kainz
> Assignee: Sergey Beryozkin
> Fix For: 2.3, 2.2.11
>
> Attachments: cxf-rt-frontend-jaxrs-2.2.10.1.patch
>
>
> 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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918242#action_12918242 ]
Sergey Beryozkin commented on CXF-3035:
---------------------------------------
Hi - thanks for the 2nd patch.
I have a test checking for Allow which has the following format :
Allow: POST,GET
So this change breaks the test expecting the list of 2 values in this example.
Yeah I can see one of those cookies contains a comma in its Expires value;
JAXRS NewCookie does not even support that Expires thing...
What I'll do is that I'll provide a workaround. i.e, I'd explcitly check if it's a SetCookie and then set it as is, otherwise - continue splitting
> Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-3035
> URL: https://issues.apache.org/jira/browse/CXF-3035
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.2.10
> Environment: any
> Reporter: Joachim F. Kainz
> Assignee: Sergey Beryozkin
> Fix For: 2.3, 2.2.11
>
> Attachments: cxf-rt-frontend-jaxrs-2.2.10.1.patch
>
>
> 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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Posted by "Joachim F. Kainz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joachim F. Kainz updated CXF-3035:
----------------------------------
Attachment: cxf-rt-frontend-jaxrs-2.2.10.1.patch
Sorry, my first patch only fixes the problem half-way. Here is a better version. This version no longer relies on .split(","), which breaks for "Set-Cookie". I hope you can use this one.
> Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-3035
> URL: https://issues.apache.org/jira/browse/CXF-3035
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.2.10
> Environment: any
> Reporter: Joachim F. Kainz
> Assignee: Sergey Beryozkin
> Fix For: 2.3, 2.2.11
>
> Attachments: cxf-rt-frontend-jaxrs-2.2.10.1.patch, cxf-rt-frontend-jaxrs-2.2.11-SNAPSHOT.patch
>
>
> 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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-3035.
-----------------------------------
Resolution: Fixed
Thanks for the patch.
At the moment I ended up with an explicit check for Set-Cookie containing Expires field as it appears it is the only field which may contain embedded ",".
Otherwise the split is done - this is because CXF server would actually return multiple Set-Cookies separated by ',', example, "a=b;c=d, a1=b1"
Hope this intermediate fix works for you
Sergey
> Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-3035
> URL: https://issues.apache.org/jira/browse/CXF-3035
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.2.10
> Environment: any
> Reporter: Joachim F. Kainz
> Assignee: Sergey Beryozkin
> Fix For: 2.3, 2.2.11
>
> Attachments: cxf-rt-frontend-jaxrs-2.2.10.1.patch
>
>
> 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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Posted by "Joachim F. Kainz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917990#action_12917990 ]
Joachim F. Kainz commented on CXF-3035:
---------------------------------------
Index: src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
===================================================================
--- src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java (revision 1004511)
+++ src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java (working copy)
@@ -338,11 +338,13 @@
if (HttpUtils.isDateRelatedHeader(entry.getKey())) {
currentResponseBuilder.header(entry.getKey(), entry.getValue());
} else if (entry.getValue().size() > 0) {
- String[] values = entry.getValue().get(0).split(",");
- for (String s : values) {
- String theValue = s.trim();
- if (theValue.length() > 0) {
- currentResponseBuilder.header(entry.getKey(), theValue);
+ for(String val : entry.getValue()) {
+ String[] values = val.split(",");
+ for (String s : values) {
+ String theValue = s.trim();
+ if (theValue.length() > 0) {
+ currentResponseBuilder.header(entry.getKey(), theValue);
+ }
}
}
}
> Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-3035
> URL: https://issues.apache.org/jira/browse/CXF-3035
> Project: CXF
> Issue Type: Bug
> Components: WS-* Components
> Affects Versions: 2.2.10
> Environment: any
> Reporter: Joachim F. Kainz
>
> 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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Posted by "Joachim F. Kainz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joachim F. Kainz updated CXF-3035:
----------------------------------
Attachment: cxf-rt-frontend-jaxrs-2.2.11-SNAPSHOT.patch
A patch for the issue. Please apply!
> Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-3035
> URL: https://issues.apache.org/jira/browse/CXF-3035
> Project: CXF
> Issue Type: Bug
> Components: WS-* Components
> Affects Versions: 2.2.10
> Environment: any
> Reporter: Joachim F. Kainz
> Attachments: cxf-rt-frontend-jaxrs-2.2.11-SNAPSHOT.patch
>
>
> 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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Posted by "Joachim F. Kainz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joachim F. Kainz updated CXF-3035:
----------------------------------
Attachment: (was: cxf-rt-frontend-jaxrs-2.2.11-SNAPSHOT.patch)
> Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-3035
> URL: https://issues.apache.org/jira/browse/CXF-3035
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.2.10
> Environment: any
> Reporter: Joachim F. Kainz
> Assignee: Sergey Beryozkin
> Fix For: 2.3, 2.2.11
>
> Attachments: cxf-rt-frontend-jaxrs-2.2.10.1.patch
>
>
> 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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Posted by "Joachim F. Kainz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joachim F. Kainz updated CXF-3035:
----------------------------------
Component/s: (was: Core)
WS-* Components
> Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-3035
> URL: https://issues.apache.org/jira/browse/CXF-3035
> Project: CXF
> Issue Type: Bug
> Components: WS-* Components
> Affects Versions: 2.2.10
> Environment: any
> Reporter: Joachim F. Kainz
>
> 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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-3035) Missing Cookies Due to
org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection,
Exchange) line 341
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin updated CXF-3035:
----------------------------------
Component/s: (was: WS-* Components)
JAX-RS
Fix Version/s: 2.2.11
2.3
Assignee: Sergey Beryozkin
thanks for the pointer to where the problem is - will get it fixed this evening
> Missing Cookies Due to org.apache.cxf.jaxrs.client.AbstractClient#setResponseBuilder(HttpURLConnection, Exchange) line 341
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-3035
> URL: https://issues.apache.org/jira/browse/CXF-3035
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.2.10
> Environment: any
> Reporter: Joachim F. Kainz
> Assignee: Sergey Beryozkin
> Fix For: 2.3, 2.2.11
>
> Attachments: cxf-rt-frontend-jaxrs-2.2.11-SNAPSHOT.patch
>
>
> 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++H++D++Y+%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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.