Cover case-insensitive byte range unit parsing

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 02:56:27 +00:00
1 parent b03573eeb0
commit cf73b44095
1 file changed
+7
+7
View File
@@ -897,6 +897,13 @@ describe("parseByteRangeHeader", () => {
});
});
it("parses case-insensitive byte-unit prefixes", () => {
expect(parseByteRangeHeader("ByTeS=0-9", 100)).toEqual({
start: 0,
end: 9,
});
});
it("parses open-ended ranges", () => {
expect(parseByteRangeHeader("bytes=10-", 100)).toEqual({
start: 10,