Skip to content

Commit

Permalink
Merge pull request #714 from sbalmos/master
Browse files Browse the repository at this point in the history
Fix for #707 webSocketUrl Jersey dispatching
  • Loading branch information
jfarcand committed Oct 26, 2012
2 parents f42c4b3 + fa55bd6 commit b85f9ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ public List<AtmosphereRequest> 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);
}
}
Expand All @@ -118,6 +120,7 @@ public List<AtmosphereRequest> onMessage(WebSocket webSocket, String d) {
.body(d)
.attributes(m)
.pathInfo(pathInfo)
.requestURI(requestURI)
.destroyable(destroyable)
.headers(resource.getRequest().headersMap())
.session(resource.session())
Expand Down
2 changes: 2 additions & 0 deletions modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -2221,6 +2221,8 @@ jQuery.atmosphere = function() {
_intraPush(message);
};

this.request = _request;

this.response = _response;
},

Expand Down

0 comments on commit b85f9ec

Please sign in to comment.