Defensively ignore multipart parsing failure in case of error dispatch
Issue: SPR-15231
(cherry picked from commit d44325e)
This commit is contained in:
parent
4f52174674
commit
4d2360e5b5
|
|
@ -1096,7 +1096,18 @@ public class DispatcherServlet extends FrameworkServlet {
|
||||||
"skipping re-resolution for undisturbed error rendering");
|
"skipping re-resolution for undisturbed error rendering");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return this.multipartResolver.resolveMultipart(request);
|
try {
|
||||||
|
return this.multipartResolver.resolveMultipart(request);
|
||||||
|
}
|
||||||
|
catch (MultipartException ex) {
|
||||||
|
if (request.getAttribute(WebUtils.ERROR_EXCEPTION_ATTRIBUTE) != null) {
|
||||||
|
logger.debug("Multipart resolution failed for error dispatch", ex);
|
||||||
|
// Keep processing error dispatch with regular request handle below
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If not returned before: return original request.
|
// If not returned before: return original request.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue