preserve custom pre-bound RequestAttributes implementations (for Grails)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -80,8 +80,8 @@ public class RequestContextListener implements ServletRequestListener {
|
||||
if (attributes == null) {
|
||||
attributes = threadAttributes;
|
||||
}
|
||||
RequestContextHolder.resetRequestAttributes();
|
||||
LocaleContextHolder.resetLocaleContext();
|
||||
RequestContextHolder.resetRequestAttributes();
|
||||
}
|
||||
if (attributes != null) {
|
||||
attributes.requestCompleted();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.springframework.web.filter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -84,8 +83,8 @@ public class RequestContextFilter extends OncePerRequestFilter {
|
||||
filterChain.doFilter(request, response);
|
||||
}
|
||||
finally {
|
||||
RequestContextHolder.resetRequestAttributes();
|
||||
LocaleContextHolder.resetLocaleContext();
|
||||
RequestContextHolder.resetRequestAttributes();
|
||||
attributes.requestCompleted();
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Cleared thread-bound request context: " + request);
|
||||
|
||||
Reference in New Issue
Block a user