- From: Simon Pieters <notifications@github.com>
- Date: Fri, 06 Nov 2026 04:20:22 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/1755/c6684663759@github.com>
zcorpan left a comment (whatwg/fetch#1755) From reviewing WICG/background-fetch#181, which switches Background Fetch to the content-range definitions exported here: **D1**: "validate a partial response" declared _previousResponse_ as an optional response, but Background Fetch passes null when nothing has been stored yet. Fixed in dacc8c9. **Q1**: "parse a single byte content-range value" only accepts lowercase `bytes ` followed directly by digits, so `Content-Range: BYTES 0-15/16` or `bytes 0-15/16` fails "validate a partial response" (ORB's 206 check, HTML's media check, Background Fetch). RFC 9110 says range units are case-insensitive. Should it be stricter than HTTP here? - a) Keep as is. Matches WebKit; the note already says it's a subset of HTTP. - b) Match `bytes` ASCII case-insensitively. Follows RFC 9110. - c) b, plus allow whitespace around the numbers. Matches Chromium; more lenient than HTTP's grammar. <details> <summary>Evidence</summary> - WebKit requires exactly `bytes ` ([ParsedContentRange.cpp](https://github.com/WebKit/WebKit/blob/15cb3560da6c863025957fce3ee065cf61902e75/Source/WebCore/platform/network/ParsedContentRange.cpp#L69-L73)). - Chromium's ORB ([orb_impl.cc](https://github.com/chromium/chromium/blob/6ca4e60b94475fa916dfb688608e6cc72693a1bf/services/network/public/cpp/orb/orb_impl.cc#L170)) and Background Fetch use `ParseContentRangeHeaderFor206`, which compares the unit case-insensitively and trims whitespace around the numbers ([http_util.cc](https://github.com/chromium/chromium/blob/6ca4e60b94475fa916dfb688608e6cc72693a1bf/net/http/http_util.cc#L321-L367)). Chrome Canary's Background Fetch succeeds with `BYTES 0-15/16` and `bytes 0-15/16`. - Gecko's ORB doesn't check the unit ([OpaqueResponseUtils.cpp](https://github.com/mozilla-firefox/firefox/blob/cac25a6fa321b0051932359b84c4e2fe3caabdc5/netwerk/protocol/http/OpaqueResponseUtils.cpp#L196-L240)). </details> -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/pull/1755#issuecomment-6684663759 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/fetch/pull/1755/c6684663759@github.com>
Received on Friday, 6 November 2026 12:20:26 UTC