Cover mixed-case spaced suffix range parsing

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 05:18:12 +00:00
1 parent 7c070b6425
commit 0c69ed5452
1 file changed
+7
+7
View File
@@ -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,