diff --git a/modules/cpr/src/main/java/org/atmosphere/websocket/protocol/SimpleHttpProtocol.java b/modules/cpr/src/main/java/org/atmosphere/websocket/protocol/SimpleHttpProtocol.java index 51484235314..dad103a3cb0 100644 --- a/modules/cpr/src/main/java/org/atmosphere/websocket/protocol/SimpleHttpProtocol.java +++ b/modules/cpr/src/main/java/org/atmosphere/websocket/protocol/SimpleHttpProtocol.java @@ -93,12 +93,14 @@ public List onMessage(WebSocket webSocket, String d) { return null; } String pathInfo = resource.getRequest().getPathInfo(); + String requestURI = resource.getRequest().getRequestURI(); if (d.startsWith(delimiter)) { int delimiterLength = delimiter.length(); int bodyBeginIndex = d.indexOf(delimiter, delimiterLength); if (bodyBeginIndex != -1) { pathInfo = d.substring(delimiterLength, bodyBeginIndex); + requestURI += pathInfo; d = d.substring(bodyBeginIndex + delimiterLength); } } @@ -118,6 +120,7 @@ public List onMessage(WebSocket webSocket, String d) { .body(d) .attributes(m) .pathInfo(pathInfo) + .requestURI(requestURI) .destroyable(destroyable) .headers(resource.getRequest().headersMap()) .session(resource.session()) diff --git a/modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js b/modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js index 1472af90cdf..7e32768943e 100644 --- a/modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js +++ b/modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js @@ -2221,6 +2221,8 @@ jQuery.atmosphere = function() { _intraPush(message); }; + this.request = _request; + this.response = _response; },