mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-10 00:59:01 +00:00
Produces media types cleared prior to error handling
Issue: SPR-16318
This commit is contained in:
@@ -1248,6 +1248,9 @@ public class DispatcherServlet extends FrameworkServlet {
|
||||
protected ModelAndView processHandlerException(HttpServletRequest request, HttpServletResponse response,
|
||||
@Nullable Object handler, Exception ex) throws Exception {
|
||||
|
||||
// Success and error responses may use different content types
|
||||
request.removeAttribute(HandlerMapping.PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE);
|
||||
|
||||
// Check registered HandlerExceptionResolvers...
|
||||
ModelAndView exMv = null;
|
||||
if (this.handlerExceptionResolvers != null) {
|
||||
|
||||
Reference in New Issue
Block a user