mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Restore removal of trailing semicolon content
See gh-26012
This commit is contained in:
@@ -618,10 +618,11 @@ public class UrlPathHelper {
|
||||
}
|
||||
StringBuilder sb = new StringBuilder(requestUri);
|
||||
while (semicolonIndex != -1) {
|
||||
int slashIndex = requestUri.indexOf('/', semicolonIndex);
|
||||
if (slashIndex >= 0) {
|
||||
sb.delete(semicolonIndex, slashIndex);
|
||||
int slashIndex = requestUri.indexOf('/', semicolonIndex + 1);
|
||||
if (slashIndex == -1) {
|
||||
slashIndex = sb.length();
|
||||
}
|
||||
sb.delete(semicolonIndex, slashIndex);
|
||||
semicolonIndex = sb.indexOf(";", semicolonIndex);
|
||||
}
|
||||
return sb.toString();
|
||||
|
||||
Reference in New Issue
Block a user