Permalink
Browse files

Add remistakenly removed code

  • Loading branch information...
1 parent b1f5664 commit 919ebcb787497aaf2564594bf59fc4c194023705 @jfarcand jfarcand committed May 18, 2012
Showing with 12 additions and 1 deletion.
  1. +12 −1 modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereRequest.java
@@ -591,6 +591,17 @@ public HttpSession getSession() {
return session;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public HttpSession getSession(boolean create) {
+ if (create) {
+ return getSession();
+ }
+ return session == null && isNotNoOps() ? b.request.getSession(false) : session;
+ }
+
private HttpSession createSession() {
return !isNotNoOps() ?
new FakeHttpSession("", null, System.currentTimeMillis(), -1) :
@@ -1470,7 +1481,7 @@ public final static AtmosphereRequest cloneRequest(HttpServletRequest request, b
.serverName(request.getServerName())
.serverPort(request.getServerPort())
.destroyable(false)
- .session(copySession? new FakeHttpSession(request.getSession(true)) : null);
+ .session(copySession ? new FakeHttpSession(request.getSession(true)) : null);
if (loadInMemory) {
r = new NoOpsRequest();

0 comments on commit 919ebcb

Please sign in to comment.