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

Sergey Beryozkin commented on CXF-7042:
---------------------------------------

The link test passes if you remove the assertion that 2 separate 'a' header 
values are returned.
CXF does not know if a user wants "A: a1, a2" or "A: a1 followed by A:a2" - 
some clients can deal with the former better, some - with the latter - it is a 
custom header. 
If we start concatenating Link by default then indeed the client will have to 
start setting this CXF property - but once it does it will start failing 
processing Set-Cookie with Expires property which contains ','. Having a 
dedicated Link check in Headers achieves a compromise: separate Link headers 
(one per relationship) is correct too while CXF client processes well known 
headers like Set-Cookie correctly too.  
Splitting a header value by default can break a single header value. The 
'worst' thing which happens otherwise is that a custom header like 'a' will 
have all its values returned in a single String.

"org.apache.cxf.http.add-headers" property is there to enforce the header 
duplication per every header value in the list of values. 
 

> review some jaxrs client defaults: thread safe and split headers
> ----------------------------------------------------------------
>
>                 Key: CXF-7042
>                 URL: https://issues.apache.org/jira/browse/CXF-7042
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Romain Manni-Bucau
>
> Hi
> putting it as "bug" but can be "improvement" depending how you see it
> I'd like we take a moment to review 2 properties of the client:
> - thread.safe.client: i think the default should be true since the spec is 
> thread safe
> - org.apache.cxf.http.header.split (AbstractClient): issue not being true by 
> default is it breaks some natural JAXRS round trips like Link: your server 
> sends Link header with 2 values, client (response.getLinks()) is not able to 
> read it. If it is about performances, known headers (the ones wrapped by some 
> higher level API in JAXRS) should at least be handled properly by default.
> Side note for headers: org.apache.cxf.transport.http.Headers#copyToResponse 
> concatenate headers properly for multiple values but not for Link header 
> cause of 
> org.apache.cxf.transport.http.Headers#HTTP_HEADERS_SINGLE_VALUE_ONLY, not 
> sure it is intended
> wdyt?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to