[ https://issues.apache.org/jira/browse/CXF-3518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034268#comment-13034268 ]
Sergey Beryozkin commented on CXF-3518: --------------------------------------- Hi, thanks for this patch. I'm a bit concerned about introducing HttpHeaderImpl in there, given that some headers, notably Set-Cookie, can contain a combination of all sort of values, ex, Set-Cookie: bar.com.anoncart=107894933471602436; Domain=.bar.com;Expires=Thu, 01-Oct-2020 23:44:22 GMT; Path=/ and I'm worried we could break some existing code there if we try to generalize, because HttpHeadersImpl will split by default. What do you think of the following approach: I reckon that realistically, as far as \" character is concerned, we can expect SomeHeader: "some text, some more text" or SomeHeader: "some text, some more text","even more text" but not SomeHeader: "some text, some more text with inlined \"" which may not be even legal. So would checking if the header value starts with \" and if yes then parse it using fast indexOf will work well in most/all such cases ? Cheers, Sergey > WebClient doesn't handle responses containing a quoted-string in a header > correctly > ----------------------------------------------------------------------------------- > > Key: CXF-3518 > URL: https://issues.apache.org/jira/browse/CXF-3518 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 2.4, 2.3.4 > Environment: JDK 1.6 > Reporter: Ka-Lok Fung > Priority: Minor > Fix For: 2.4.1, 2.3.5 > > Attachments: trunk.wc_quote_minimal.diff > > > Similar to CXF-2462, if a request returns a response header that looks like > the following: > bq. {{q: "stuff with commas, and spaces"}} > WebClient's response.getMetadata() returns 2 values: > {quote} > # "stuff with commas > # and spaces" > {quote} > while the correct response should be: > {quote} > # stuff with commas, and spaces > {quote} > Here's the WebClient code which reproduces the issue (as long as the server > response contains a header that returns the header value above): > {code:Java} > Response r = WebClient.create(new > URI("http://localhost:8080")).path("key/quoted").get(); > List<Object> l = r.getMetadata().get("q"); > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira