You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2015/04/30 16:12:47 UTC
[2/5] cxf git commit: [CXF-6335] Explicitly set HTTPConduit on client
inbound message
[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/4e4b8279
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4e4b8279
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4e4b8279
Branch: refs/heads/2.7.x-fixes
Commit: 4e4b82797593a6073ba49454cad12591e8f78857
Parents: 61ce8c1
Author: Alessio Soldano <as...@redhat.com>
Authored: Wed Apr 8 23:43:56 2015 +0200
Committer: Daniel Kulp <dk...@apache.org>
Committed: Thu Apr 30 10:08:27 2015 -0400
----------------------------------------------------------------------
.../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/4e4b8279/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 c408fc8..cbfebf7 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;
@@ -1570,6 +1571,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) {
@@ -1627,7 +1629,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;