Fix wrong reference in UrlPathHelper.removeSemicolonContentInternal()
This commit also changes to short-circuit when `slashIndex` is -1.
This commit is contained in:
@@ -618,9 +618,9 @@ public class UrlPathHelper {
|
||||
}
|
||||
StringBuilder sb = new StringBuilder(requestUri);
|
||||
while (semicolonIndex != -1) {
|
||||
int slashIndex = requestUri.indexOf('/', semicolonIndex + 1);
|
||||
int slashIndex = sb.indexOf("/", semicolonIndex + 1);
|
||||
if (slashIndex == -1) {
|
||||
slashIndex = sb.length();
|
||||
return sb.substring(0, semicolonIndex);
|
||||
}
|
||||
sb.delete(semicolonIndex, slashIndex);
|
||||
semicolonIndex = sb.indexOf(";", semicolonIndex);
|
||||
|
||||
Reference in New Issue
Block a user