[ https://issues.apache.org/jira/browse/CXF-3518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ka-Lok Fung updated CXF-3518: ----------------------------- Attachment: trunk.webclient.quote.try2.diff I've implemented the "good enough" proposal per the feedback from Sergey. As long as long all the values inside the header are appropriately quoted, they will be available to {{WebClient}}. If the values aren't quoted correctly, {{WebClient}} will apply a "best effort" approach to return the header data from the server to the client. I've also added/modified three system tests to component test these changes: * I've extended the ETag test to make sure the current {{WebClient}} behaviour remains - that is, if the server returned quoted values, {{WebClient}} also return quoted values. * Added a test for quoted-strings in headers * Added a test for malformed quoted-strings in headers & broken per spec case discussed above > 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, > trunk.webclient.quote.try2.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