Correctly identify MaxUploadSizeExceededException in StandardMultipartHttpServletRequest
This commit correctly identifies MaxUploadSizeExceededException in StandardMultipartHttpServletRequest by converting keywords in the exception message to lowercase before checking for their presence, for compatibility with Jetty 9.4.x. Closes gh-28759
This commit is contained in:
parent
3c3ae32f07
commit
10838a636f
|
@ -118,9 +118,12 @@ public class StandardMultipartHttpServletRequest extends AbstractMultipartHttpSe
|
|||
|
||||
protected void handleParseFailure(Throwable ex) {
|
||||
String msg = ex.getMessage();
|
||||
if (msg != null && msg.contains("size") && msg.contains("exceed")) {
|
||||
if (msg != null) {
|
||||
msg = msg.toLowerCase();
|
||||
if (msg.contains("size") && msg.contains("exceed")) {
|
||||
throw new MaxUploadSizeExceededException(-1, ex);
|
||||
}
|
||||
}
|
||||
throw new MultipartException("Failed to parse multipart servlet request", ex);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue