Cover mixed-case spaced suffix range parsing
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
7c070b6425
commit
0c69ed5452
1 file changed
+7
@@ -1061,6 +1061,13 @@ describe("parseByteRangeHeader", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("parses mixed-case whitespace-padded suffix ranges", () => {
|
||||
expect(parseByteRangeHeader("ByTeS = - 5", 100)).toEqual({
|
||||
start: 95,
|
||||
end: 99,
|
||||
});
|
||||
});
|
||||
|
||||
it("clamps oversized suffix ranges to full file", () => {
|
||||
expect(parseByteRangeHeader("bytes=-500", 100)).toEqual({
|
||||
start: 0,
|
||||
|
||||
Reference in new issue
Block a user