Skip to content

Commit

Permalink
修改session对象的值时,需要调一下httpSession.update()
Browse files Browse the repository at this point in the history
  • Loading branch information
tywo45 committed Feb 14, 2020
1 parent a25d127 commit 8940133
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1175,11 +1175,13 @@ public HttpSession updateSessionId(HttpRequest request, HttpSession httpSession,
String oldId = httpSession.getId();
String newId = httpConfig.getSessionIdGenerator().sessionId(httpConfig, request);
httpSession.setId(newId);
httpSession.update(httpConfig); //HttpSession有变动时,都要调一下update()
if (httpSessionListener != null) {
httpSessionListener.doAfterCreated(request, httpSession, httpConfig);
}
httpConfig.getSessionStore().remove(oldId);
createSessionCookie(request, httpSession, httpResponse, true);

return httpSession;
}

Expand Down

0 comments on commit 8940133

Please sign in to comment.