Closes gh-24925
@ -130,7 +130,7 @@ public class WebRequestDataBinder extends WebDataBinder {
*/
private boolean isMultipartRequest(WebRequest request) {
String contentType = request.getHeader("Content-Type");
return (contentType != null && StringUtils.startsWithIgnoreCase(contentType, "multipart"));
return StringUtils.startsWithIgnoreCase(contentType, "multipart");
}
private void bindParts(HttpServletRequest request, MutablePropertyValues mpvs) {
@ -136,7 +136,7 @@ class RegexPathElement extends PathElement {
if (matches) {
if (isNoMorePattern()) {
if (matchingContext.determineRemainingPath &&
(this.variableNames.isEmpty() ? true : textToMatch.length() > 0)) {
(this.variableNames.isEmpty() || textToMatch.length() > 0)) {
matchingContext.remainingPathIndex = pathIndex + 1;
matches = true;