Fix Tomcat compatibility issue where HttpSession unavailable during "logoff". Thanks to Aaron Tang.
This commit is contained in:
parent
82ed7253d4
commit
89ba20f057
|
@ -92,7 +92,8 @@ public class HttpSessionIntegrationFilter extends AbstractIntegrationFilter {
|
||||||
|
|
||||||
public void commitToContainer(ServletRequest request,
|
public void commitToContainer(ServletRequest request,
|
||||||
Authentication authentication) {
|
Authentication authentication) {
|
||||||
if (request instanceof HttpServletRequest) {
|
if (request instanceof HttpServletRequest
|
||||||
|
&& ((HttpServletRequest) request).isRequestedSessionIdValid()) {
|
||||||
HttpSession httpSession = ((HttpServletRequest) request).getSession();
|
HttpSession httpSession = ((HttpServletRequest) request).getSession();
|
||||||
|
|
||||||
if (httpSession != null) {
|
if (httpSession != null) {
|
||||||
|
|
|
@ -270,7 +270,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRequestedSessionIdValid() {
|
public boolean isRequestedSessionIdValid() {
|
||||||
throw new UnsupportedOperationException("mock method not implemented");
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setScheme(String scheme) {
|
public void setScheme(String scheme) {
|
||||||
|
|
Loading…
Reference in New Issue