Repository: cxf Updated Branches: refs/heads/master 65dce2388 -> 40a8c9247
[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/40a8c924 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/40a8c924 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/40a8c924 Branch: refs/heads/master Commit: 40a8c9247e0829ecac38764cf4b27d1e0102f7b3 Parents: 65dce23 Author: Alessio Soldano <[email protected]> Authored: Wed Apr 8 23:43:56 2015 +0200 Committer: Alessio Soldano <[email protected]> Committed: Wed Apr 8 23:43:56 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/40a8c924/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 1d9ae9c..a6ebaa7 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; @@ -1585,6 +1586,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) { @@ -1642,7 +1644,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;
