You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Second, for the method of onResponseCommitted in SessionRepositoryResponseWrapper.java
private final class SessionRepositoryResponseWrapper
extends OnCommittedResponseWrapper {
private final SessionRepositoryRequestWrapper request;
/**
* Create a new {@link SessionRepositoryResponseWrapper}.
* @param request the request to be wrapped
* @param response the response to be wrapped
*/
SessionRepositoryResponseWrapper(SessionRepositoryRequestWrapper request,
HttpServletResponse response) {
super(response);
if (request == null) {
throw new IllegalArgumentException("request cannot be null");
}
this.request = request;
}
@Override
protected void onResponseCommitted() {
this.request.commitSession();
}
}
The request.commitSession() method is called in both places.
why? Is this not a repeated call?
The text was updated successfully, but these errors were encountered:
Is this causing you problems? The reason is that we need to ensure that the session is created before the response is committed. If the response is already committed there will be no way to track the session (i.e. a cookie cannot be written to the response to keep track of which session id).
based on spring-session 2.0.5.RELEASE
There are two code snippets here. eg:
First, for the method of doFilterInternal in SessionRepostoryFilter.java
Second, for the method of onResponseCommitted in SessionRepositoryResponseWrapper.java
The request.commitSession() method is called in both places.
why? Is this not a repeated call?
The text was updated successfully, but these errors were encountered: