Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.0
-
None
-
None
Description
The method writeWithFullHeader() in AddResource throws
StringIndexOutOfBoundsException: String index out of range: -1
on the line:
writer.write(originalResponse.substring(insertPosition));
The rest of the method contains checks for insertPosition to be >= 0, therefore the line should be changed to something like:
writer.write(insertPosition > 0 ? originalResponse.substring(insertPosition) : originalResponse);