[
https://issues.apache.org/jira/browse/CXF-9087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17905554#comment-17905554
]
Andriy Redko commented on CXF-9087:
-----------------------------------
Hello [~dsylaiev] , I have troubles reproducing the behavior that you are
reporting. Here is the snippet I am using (CXF 3.5.10):
{quote}WebClient webClient = WebClient.create("http://localhost:8080/");
webClient.cookie(new javax.ws.rs.core.Cookie("a", "1", null, null, 0));
webClient.cookie(new javax.ws.rs.core.Cookie("b", "2", null, null, 0));
webClient.invoke("GET", null);
{quote}
Here is the raw HTTP request captured:
{quote}Cookie: a=1
Cookie: b=2
Accept: */*
User-Agent: Apache-CXF/3.5.10
Cache-Control: no-cache
Pragma: no-cache
Host: localhost:8080
Connection: keep-alive
{quote}
It does not mean it is correct but there are multiple Cookie headers sent out.
> AbstractClient::cookie method creates incorrect Cookie header
> -------------------------------------------------------------
>
> Key: CXF-9087
> URL: https://issues.apache.org/jira/browse/CXF-9087
> Project: CXF
> Issue Type: Bug
> Affects Versions: 3.5.9
> Reporter: Dmytro Sylaiev
> Priority: Minor
>
> When executing this code:
> {noformat}
> WebClient webClient = WebClient.create(url);
> webClient.cookie(new javax.ws.rs.core.Cookie("a", "1"));
> webClient.cookie(new javax.ws.rs.core.Cookie("b", "2"));
> webClient.invoke("GET", null);{noformat}
> the WebClient would invoke an HTTP request with the next Cookie header:
> {noformat}
> Cookie: $Version=1;1=2, $Version=1;2=3{noformat}
> which is against the RFC 6265, where multiple cookies should be separated by
> a semicolon, not a comma, and doesn't include $Version in the Cookie header
>
> when using Postman, the header on the client request is
> {noformat}
> Cookie: 1=2; 2=3{noformat}
> and seems it is the expected result for AbstractClient as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)