cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [4/9] cxf git commit: [CXF-6548] Updating ClientProxyImpl to avoid setting CT if the body is null and transport Headers to let custom CT stay even if the request is empty if overriding CT */* is needed
Date Fri, 30 Oct 2015 15:33:06 GMT
[CXF-6548] Updating ClientProxyImpl to avoid setting CT if the body is null and transport Headers
to let custom CT stay even if the request is empty if overriding CT */* is needed


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/de02871d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/de02871d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/de02871d

Branch: refs/heads/2.7.x-fixes
Commit: de02871d47a84961bff19def786236844db937f9
Parents: 35d2003
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Aug 19 12:00:42 2015 +0100
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Oct 30 11:05:52 2015 -0400

----------------------------------------------------------------------
 .../http/src/main/java/org/apache/cxf/transport/http/Headers.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/de02871d/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
index f1d5b70..f3a63b9 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
@@ -299,7 +299,7 @@ public class Headers {
             dropContentType = !MessageUtils.getContextualBoolean(message, SET_EMPTY_REQUEST_CT_PROPERTY,
true);
         }
         if (!dropContentType) {
-            String ct = emptyRequest ? "*/*" : determineContentType();
+            String ct = emptyRequest && !headers.containsKey(Message.CONTENT_TYPE)
? "*/*" : determineContentType();
             connection.setRequestProperty(HttpHeaderHelper.CONTENT_TYPE, ct);
         }
          


Mime
View raw message