[cxf] branch 3.3.x-fixes updated (540dcbb -> 52d98ab)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[cxf] branch 3.3.x-fixes updated (540dcbb -> 52d98ab)

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

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


    from 540dcbb  Updating to Spring Security 5.1.8 and Reactor 3.2.14
     new 3790486  CXF-7959: WebClient invocation builder header(name, value) method is not implemented according to interface specification
     new 52d98ab  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(-)

Reply | Threaded
Open this post in threaded view
|

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

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

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

commit 37904869536ab94471314505ffcfecb2c838f83e
Author: reta <[hidden email]>
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)
---
 .../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 9d81127..4bd6dc4 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
@@ -68,6 +68,15 @@ public class InvocationBuilderImplTest {
         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);

Reply | Threaded
Open this post in threaded view
|

[cxf] 02/02: Recording .gitmergeinfo Changes

reta
In reply to this post by reta
This is an automated email from the ASF dual-hosted git repository.

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

commit 52d98ab6502a573daf9c5efdf889f45b19db1a52
Author: reta <[hidden email]>
AuthorDate: Sat Feb 8 21:28:16 2020 -0500

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

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 3a0f699..35e009e 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -118,6 +118,7 @@ M 09ddfdeaef6f32537dba23fa6d7ef36992b3217b
 M 160f50ed9bd9391b61417716b3a67653c9e81a98
 M 180578d01f361d77ce7f42dd760fa8d5f245ce7e
 M 2275d49772676ac72bc14ebbc3173719cd72e635
+M 2cde96f38fc835f7d0eb1e303037e572110c3399
 M 325ed0436bc9cfa9150b3504a54b5911b47e3266
 M 3b119ca6630f1384b93cd718d0cd95ccabc81e91
 M 3dfe11c866073ff93951dac2b94e0f8e8e464b27
@@ -146,6 +147,7 @@ M aefdc0759e30cb44d1729f08d1f31ff516a14e03
 M b9732e5a2d4cead834af8246a35b863aa7b8c811
 M bf1b85003e89c4b3e28384f0de476cf0e5b1af12
 M c1b729ea9f0c43e6560099dbc427751fe33ee088
+M d17a51cbff36aa314374d4621434968422fb9c9f
 M d5b612c220bab496c3dab1731e56b3fea36c1b07
 M d8619b13cd9ff375590946c1349f6fe374959f30
 M d875ceee917237f5c344df989947aff025d45d4f