Refactor SockJS code

- configure SockJS handler by type (as well as by instance)
- add method to obtain SockJS handler instance via SockJsConfiguration
- detect presense of jsr-356 and use it if available
This commit is contained in:
Rossen Stoyanchev
2013-04-09 09:43:20 -04:00
parent 4ad6091510
commit 6bd6311214
41 changed files with 727 additions and 383 deletions

View File

@@ -134,8 +134,10 @@ public class ServletServerHttpRequest implements ServerHttpRequest {
public Cookies getCookies() {
if (this.cookies == null) {
this.cookies = new Cookies();
for (Cookie cookie : this.servletRequest.getCookies()) {
this.cookies.addCookie(cookie.getName(), cookie.getValue());
if (this.servletRequest.getCookies() != null) {
for (Cookie cookie : this.servletRequest.getCookies()) {
this.cookies.addCookie(cookie.getName(), cookie.getValue());
}
}
}
return this.cookies;