If SessionRepositoryRequestWrapper.commitSession() is invoked twice
when a new session is created, then CookieHttpSessionStrategy will
add the same cookie twice. A couple examples of how this could happen:
* The response is committed and
SessionRepositoryResponseWrapper.onResponseCommitted() invokes
SessionRepositoryRequestWrapper.commitSession(). Then the finally
block in SessionRepositoryFilter invokes
SessionRepositoryRequestWrapper.commitSession() again.
* The new session is initialized and an Exception is thrown (i.e.
gh-229). The SessionRepositoryFilter invokes
SessionRepositoryRequestWrapper.commitSession() in the REQUEST
dispatch. Then in the ERROR dispatch SessionRepositoryFilter invokes
SessionRepositoryRequestWrapper.commitSession() invokes it again.
This commit ensures if the same Session is passed into
CookieHttpSessionStrategy multiple times within the same HttpServletRequest
it is only written once by keeping track of the sessions on a request
attribute.
Fixes gh-251
Previously, if the following happened:
* New Session Created
* Exception thrown
* Exception processed by error handler within Servlet
* Error Handler used a session
The result would be two sessions were created. This means the
data from the first session was also lost. This happend
because ERROR dispatch is a separate Filter invocation where
the request is no longer wrapped.
This commit ensures that currentSession is saved on a
HttpServletRequest attribute so that the ERROR dispatch sees
that a session was already created.
Fixes: gh-229
Previously, if a user had a reference to an existing HttpSession and
changed the session id, it would not work. For example:
HttpSession s = request.getSession();
request.changeSessionId();
s.setAttribute(...);
This commit fixes holding on to a reference of an HttpSession when
the session id is changed.
Fixes gh-227
Previously RedisHttpSessionConfiguration
enableRedisKeyspaceNotificationsInitializer return type was a package
protected class. This meant if someone extended
RedisHttpSessionConfiguration they got IllegalAccessErrors.
This changes the return type to InitializingBean.
Fixes gh-109
Fix typo in maven dependiecs of some of the the guides
Cutting and pasting the maven dependecies from the guides was failing
due to an xml element that was not closed.
Fixes gh-211
While the projects subdomain is not necessary due to a redirect
it does provide a faster experience for users.
This commit adds the projects subdomain to the project URL to
avoid unnecessary redirects.
Fixes gh-220
There's a duplicate of this field in
org.springframework.session.data.redis.config.ConfigureNotifyKeyspaceEventsAction which is
what is actually used.
Fixes gh-225
Spring IO Platform 2.0 will remove the managed versions .properties
file as support for it has been removed in Spring Boot 1.3.
This commit moves the build onto a new version of the Spring IO Plugin
that uses the Maven bom rather than the properties file.
This issue is a result of moving EmbeddedRedisConfiguration to its own
package in 865e381c7c.
Now we explicitly add EnableEmbeddedRedis to the configuration.
Fixes gh-191
Previously forcibly cleaning up sessions was not working. All the cleanup
was done by Redis expiration. This meant that sessions would be kept alive
until Redis cleaned them up (non deterministic).
This commit resolves the mapping of expiration to session ids.
Fixes gh-169
This prevents the embedded redis from being picked up in ComponentScan
in any of the samples unless the @EnableEmebeddedRedis annotation is used.
Polish gh-184