-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Description
Silvio Assunção Junior opened SPR-12747 and commented
I use now Spring 3.2.2 and I'm upgrading to 3.2.13 but I found a error on ResourceHttpRequestHandler
I configured my MVC resources example:
<mvc:resources location="/favicon.ico" mapping="/favicon.ico" cache-period="31556926"/>
When I request the favicon (http://localhost:8080/favicon.ico) I receive 404 (Not found). I debug the ResourceHttpRequestHandler and see that in this version has a method that in old version don't have "isResourceUnderLocation"
This method have a validation that I think is wrong
if (!resourcePath.startsWith(locationPath)) {
return false;
}
The correct in this case is locationPath.startsWith(resourcePath) because before this validation we have this code bellow
locationPath = (locationPath.endsWith("/") ||
!StringUtils.hasLength(locationPath) ? locationPath : locationPath + "/");
Affects: 3.2.13, 4.1.4
Backported to: 3.2.14