You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2020/02/09 02:32:01 UTC

[cxf] branch 3.2.x-fixes updated (59a5ccc -> 17e63e0)

This is an automated email from the ASF dual-hosted git repository.

reta pushed a change to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from 59a5ccc  Updating to Spring Security 4.2.14
     new f8cba85  CXF-7959: WebClient invocation builder header(name, value) method is not implemented according to interface specification
     new 17e63e0  Recording .gitmergeinfo Changes

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitmergeinfo                                                    | 2 ++
 .../org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java  | 8 +++++++-
 .../apache/cxf/jaxrs/client/spec/InvocationBuilderImplTest.java  | 9 +++++++++
 3 files changed, 18 insertions(+), 1 deletion(-)


[cxf] 01/02: CXF-7959: WebClient invocation builder header(name, value) method is not implemented according to interface specification

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit f8cba853b9eaa4da4754cde9039295334bb8dfce
Author: reta <dr...@gmail.com>
AuthorDate: Sat Feb 8 15:36:18 2020 -0500

    CXF-7959: WebClient invocation builder header(name, value) method is not implemented according to interface specification
    
    (cherry picked from commit a2296f2e54dff0b353581d2e6fb0d72fbc8368a3)
    (cherry picked from commit 37904869536ab94471314505ffcfecb2c838f83e)
---
 .../org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java  | 8 +++++++-
 .../apache/cxf/jaxrs/client/spec/InvocationBuilderImplTest.java  | 9 +++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java
index 3e623ef..471a9ec 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java
@@ -270,7 +270,13 @@ public class InvocationBuilderImpl implements Invocation.Builder {
         if (hd != null) {
             value = hd.toString(value);
         }
-        webClient.header(name, value);
+        
+        // If value is null then all current headers of the same name should be removed
+        if (value == null) {
+            webClient.replaceHeader(name, value);
+        } else {
+            webClient.header(name, value);
+        }
     }
 
     @Override
diff --git a/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImplTest.java b/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImplTest.java
index a28ab2c..a1f6ea2 100644
--- a/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImplTest.java
+++ b/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImplTest.java
@@ -65,6 +65,15 @@ public class InvocationBuilderImplTest extends Assert {
         String sentHeaders = response.readEntity(String.class);
         assertTrue(sentHeaders.contains("Header1=b"));
         assertFalse(sentHeaders.contains("UnexpectedHeader"));
+
+        // If value is null then all current headers of the same name 
+        // should be removed.
+        builder.header("Header1", null);
+        builder.header("Header2", "b");
+        response = builder.get();
+        sentHeaders = response.readEntity(String.class);
+        assertTrue(sentHeaders.contains("Header2=b"));
+        assertFalse(sentHeaders.contains("Header1"));
         
         // null headers map should clear all headers
         builder.headers(null);


[cxf] 02/02: Recording .gitmergeinfo Changes

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 17e63e02165043d45b806cc2bf9ef6e2196db225
Author: reta <dr...@gmail.com>
AuthorDate: Sat Feb 8 21:30:55 2020 -0500

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 0273e20..057a426 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -271,6 +271,7 @@ B 515ba9d707830185f6e4123197767893e41a556e
 B 51cb48ac7264210a755224f4487d78ea3fe190a2
 B 525adf09d4f2813822b0171bb7652003e4a16c61
 B 52856a8e43e5b05952b837611f2bb1289651b012
+B 52d98ab6502a573daf9c5efdf889f45b19db1a52
 B 52f7e10ffa5b7d8c32d21b00bc36c53c50a4a198
 B 5323c53ca578b33ac85c6618e365581685e6bb81
 B 5355846043def4fe23df92262f4791821ea9547c
@@ -854,6 +855,7 @@ M 50360a938a6e6d807560ac89748fb9f931d44fcf
 M 504a1b7827bc76f3c5106b901b44e54513db17aa
 M 52f2cc152ceccd3981361dc840338c16416786fa
 M 53e45f515d36a31d99d0eab4e1776e5a17eeba55
+M 540dcbbeb0833fec994eb794fd98edf0449956be
 M 56f74c18d7c709307b174cb211b28e4384574e9b
 M 57f8c554b04af4e06b4e97bb349cbb8adeeb7acc
 M 5827b0bb9d5a62f420f5277ffa456fd8a6083ab0