Repository: cxf Updated Branches: refs/heads/master 3d635a798 -> afd049257
correct the previous fix in AhcWebSocketConduit's jaxrs uri path handling Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/afd04925 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/afd04925 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/afd04925 Branch: refs/heads/master Commit: afd049257896a11bc7f53b7e84fbb0c2ca212221 Parents: 3d635a7 Author: Akitoshi Yoshida <[email protected]> Authored: Thu Jun 12 14:57:12 2014 +0200 Committer: Akitoshi Yoshida <[email protected]> Committed: Thu Jun 12 14:57:40 2014 +0200 ---------------------------------------------------------------------- .../transport/websocket/ahc/AhcWebSocketConduit.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/afd04925/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java ---------------------------------------------------------------------- diff --git a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java index d3f2fe0..5da490e 100644 --- a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java +++ b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/ahc/AhcWebSocketConduit.java @@ -114,10 +114,16 @@ public class AhcWebSocketConduit extends URLConnectionHTTPConduit { entity = message.get(AhcWebSocketConduitRequest.class); //REVISIT how we prepare the request String requri = (String)message.getContextualProperty("org.apache.cxf.request.uri"); - if (requri.startsWith("ws")) { - entity.setPath(requri.substring(requri.indexOf(url.getPath()))); + if (requri != null) { + // jaxrs speicfies a sub-path using prop org.apache.cxf.request.uri + if (requri.startsWith("ws")) { + entity.setPath(requri.substring(requri.indexOf('/', 3 + requri.indexOf(':')))); + } else { + entity.setPath(url.getPath() + requri); + } } else { - entity.setPath(url.getPath() + requri); + // jaxws + entity.setPath(url.getPath()); } entity.setId(UUID.randomUUID().toString()); uncorrelatedRequests.put(entity.getId(), new RequestResponse(entity));
