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
Copy file name to clipboardExpand all lines: spring-session-core/src/main/java/org/springframework/session/web/http/SessionRepositoryFilter.java
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -310,6 +310,10 @@ public HttpSessionWrapper getSession(boolean create) {
310
310
if (!create) {
311
311
returnnull;
312
312
}
313
+
if (SessionRepositoryFilter.this.httpSessionIdResolverinstanceofCookieHttpSessionIdResolver
314
+
&& this.response.isCommitted()) {
315
+
thrownewIllegalArgumentException("Cannot create a session after the response has been committed");
316
+
}
313
317
if (SESSION_LOGGER.isDebugEnabled()) {
314
318
SESSION_LOGGER.debug(
315
319
"A new session was created. To help you troubleshoot where the session was created we provided a StackTrace (this is not an error). You can prevent this from appearing by disabling DEBUG logging for "
0 commit comments