Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloneRequest puts copied session in wrong object on Tomcat 7 #520

Closed
fabiangebert opened this issue Jul 22, 2012 · 1 comment
Closed

cloneRequest puts copied session in wrong object on Tomcat 7 #520

fabiangebert opened this issue Jul 22, 2012 · 1 comment
Labels

Comments

@fabiangebert
Copy link

AtmosphereRequest#cloneRequest puts the fake session in the session builder:

.session(copySession ? new FakeHttpSession(request.getSession(true)) : null);

In the AtmosphereRequest$Builder this is executed:

if (NoOpsRequest.class.isAssignableFrom(request.getClass())) {
    NoOpsRequest.class.cast(request).fake = session;
} else {
   hackedJettySession = session;
}

And since at the time of call, the request is no NoOpsRequest, the session will be put in hackedJettySession.

The only way I can get the session now is the following (Groovy):
value = cometResource.request.b.hackedJettySession.getAttribute(key)

This works. However, on Jetty, this works, too:
value = cometResource.session.getAttribute(key)

It would be nice to have it this simple on Tomcat, too.

@jfarcand
Copy link
Member

Agree. Looking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants