mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-22 12:02:14 +00:00
Improved exception handling if response already committed.
This commit is contained in:
parent
d5a6ea044d
commit
3f6961d855
@ -105,7 +105,11 @@ public class HttpSessionIntegrationFilter extends AbstractIntegrationFilter {
|
|||||||
|
|
||||||
public Object extractFromContainer(ServletRequest request) {
|
public Object extractFromContainer(ServletRequest request) {
|
||||||
if (request instanceof HttpServletRequest) {
|
if (request instanceof HttpServletRequest) {
|
||||||
HttpSession httpSession = ((HttpServletRequest) request).getSession();
|
HttpSession httpSession = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
httpSession = ((HttpServletRequest) request).getSession();
|
||||||
|
} catch (IllegalStateException ignored) {}
|
||||||
|
|
||||||
if (httpSession != null) {
|
if (httpSession != null) {
|
||||||
Object authObject = httpSession.getAttribute(ACEGI_SECURITY_AUTHENTICATION_KEY);
|
Object authObject = httpSession.getAttribute(ACEGI_SECURITY_AUTHENTICATION_KEY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user