We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75a9c45 commit 4bcf92fCopy full SHA for 4bcf92f
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java
@@ -315,7 +315,8 @@ else if (resource instanceof ServletContextResource) {
315
resourcePath = resource.getURL().getPath();
316
locationPath = location.getURL().getPath();
317
}
318
- locationPath = (locationPath.endsWith("/") || locationPath.isEmpty() ? locationPath : locationPath + "/");
+ locationPath = (locationPath.endsWith("/") ||
319
+ !StringUtils.hasText(locationPath) ? locationPath : locationPath + "/");
320
if (!resourcePath.startsWith(locationPath)) {
321
return false;
322
0 commit comments