You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2018/02/01 18:49:37 UTC

[GitHub] andymc12 commented on a change in pull request #373: JAX-RS 2.1 TCK issues

andymc12 commented on a change in pull request #373: JAX-RS 2.1 TCK issues
URL: https://github.com/apache/cxf/pull/373#discussion_r165451479
 
 

 ##########
 File path: rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java
 ##########
 @@ -253,10 +253,13 @@ public Builder header(String name, Object value) {
 
     @Override
     public Builder headers(MultivaluedMap<String, Object> headers) {
-        RuntimeDelegate rd = HttpUtils.getOtherRuntimeDelegate();
-        for (Map.Entry<String, List<Object>> entry : headers.entrySet()) {
-            for (Object value : entry.getValue()) {
-                doSetHeader(rd, entry.getKey(), value);
+        webClient.removeAllHeaders();
+        if (headers != null) {
 
 Review comment:
   I agree it is odd... I'm not sure if the TCK tests it or not, but the [javadoc](https://jax-rs.github.io/apidocs/2.1/javax/ws/rs/client/Invocation.Builder.html#headers-javax.ws.rs.core.MultivaluedMap- ) says that if the passed-in map is null, then all existing headers should be removed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services