Support resource URL encoding at context path

Issue: SPR-13757
This commit is contained in:
Rossen Stoyanchev
2015-12-10 12:24:04 -05:00
parent beef5ff4c3
commit dc7ed57c67
3 changed files with 60 additions and 0 deletions

View File

@@ -95,6 +95,13 @@ public class ResourceUrlEncodingFilter extends OncePerRequestFilter {
String requestUri = urlProvider.getPathHelper().getRequestUri(this.request);
String lookupPath = urlProvider.getPathHelper().getLookupPathForRequest(this.request);
this.indexLookupPath = requestUri.lastIndexOf(lookupPath);
if ("/".equals(lookupPath) && !"/".equals(requestUri)) {
String contextPath = urlProvider.getPathHelper().getContextPath(this.request);
if (requestUri.equals(contextPath)) {
this.indexLookupPath = requestUri.length();
}
}
}
}