Reject range starting above resource length
Closes: gh-23576
This commit is contained in:
@@ -65,6 +65,7 @@ public abstract class HttpRange {
|
||||
long contentLength = getLengthFor(resource);
|
||||
long start = getRangeStart(contentLength);
|
||||
long end = getRangeEnd(contentLength);
|
||||
Assert.isTrue(start < contentLength, "'position' exceeds the resource length " + contentLength);
|
||||
return new ResourceRegion(resource, start, end - start + 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user