cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject [1/2] cxf git commit: [CXF-6335] Explicitly set HTTPConduit on client inbound message
Date Wed, 08 Apr 2015 22:14:05 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes cfdd73b74 -> 47b248a25


[CXF-6335] Explicitly set HTTPConduit on client inbound message


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

Branch: refs/heads/3.0.x-fixes
Commit: 32931253741e95e81b9d422daa466f0bc96c8c60
Parents: cfdd73b
Author: Alessio Soldano <asoldano@redhat.com>
Authored: Wed Apr 8 23:43:56 2015 +0200
Committer: Alessio Soldano <asoldano@redhat.com>
Committed: Wed Apr 8 23:47:20 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/cxf/transport/http/HTTPConduit.java | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/32931253/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
index 4b9adc1..304f644 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
@@ -71,6 +71,7 @@ import org.apache.cxf.policy.PolicyDataEngine;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.AbstractConduit;
 import org.apache.cxf.transport.Assertor;
+import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.transport.http.auth.DefaultBasicAuthSupplier;
 import org.apache.cxf.transport.http.auth.DigestAuthSupplier;
@@ -1588,6 +1589,7 @@ public abstract class HTTPConduit
             inMessage.setExchange(exchange);
             updateResponseHeaders(inMessage);
             inMessage.put(Message.RESPONSE_CODE, responseCode);
+            propagateConduit(exchange, inMessage);
 
             if (!doProcessResponse(outMessage, responseCode)
                 || HttpURLConnection.HTTP_ACCEPTED == responseCode) {
@@ -1645,7 +1647,15 @@ public abstract class HTTPConduit
             
         }
 
-        
+        protected void propagateConduit(Exchange exchange, Message in) {
+            if (exchange != null) {
+                Message out = exchange.getOutMessage();
+                if (out != null) {
+                    in.put(Conduit.class, out.get(Conduit.class));
+                }
+            }
+        }
+
         protected void handleHttpRetryException(HttpRetryException e) throws IOException
{
             String msg = "HTTP response '" + e.responseCode() + ": "
                 + getResponseMessage() + "' invoking " + url;


Mime
View raw message