StringIndexOutOfBoundsException when rewriting links in CSS resources [SPR-16526] #21069
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Ravish Bhagdev opened SPR-16526 and commented
Scenario,
It seems like the relative paths to PNG files within my CSS are processed incorrectly. Prefix and suffix generated in ResourceUrlProvider.java on line number 183 and 184 and then incorrect:
int prefixIndex = getLookupPathIndex(request);
int suffixIndex = getEndPathIndex(requestUrl);
Suffix index is often > prefix index. Causing above exception.
Here is my configuration:
VersionResourceResolver versionResourceResolver = new VersionResourceResolver()
.addVersionStrategy(new ContentVersionStrategy(), "/**");
Affects: 4.3.13
Reference URL: #18420
Issue Links:
Referenced from: commits 56fdda1, 6d26e61
Backported to: 4.3.15
The text was updated successfully, but these errors were encountered: