Applies to: Protocol and format interpretation for developers inspecting authorized media delivery.
The useful distinctions
- If-Range combines a validator with a Range request.
- A failed If-Range condition causes Range to be ignored.
- A weak entity tag is not permitted as an If-Range validator.
Bind the offset to an object version
An offset is meaningful only within the object used to calculate it. Imagine an archive downloader holding the first 2048 bytes of revision r7. If a publisher later replaces that path with revision r8, appending the remainder of r8 would create a file that never existed at the origin. The synthetic request carries both the desired continuation point and the tag associated with the saved prefix, making that relationship explicit.
Handle both response branches
A resume implementation needs two separate storage paths in its reasoning: append a confirmed continuation, or replace the old partial object with a newly returned complete object. The status and returned metadata determine the branch. Never decide to append merely because a request contained a Range field. Keep the saved prefix length and saved validator together in the same local record so a restart cannot pair an old offset with a new identifier. When no suitable validator is available, document that uncertainty instead of labelling the operation a verified resume. The example demonstrates the request contract without making any request or asserting an origin response. The saved-prefix record should also retain its actual byte count. If a partial local write saved fewer than 2048 bytes, the displayed continuation request would already be wrong before reaching an origin.
Worked example · synthetic
The tag is invented and strong because it has no W/ prefix. If the selected representation no longer matches it, a complete response must replace rather than extend the saved prefix.
Synthetic text example; no network operation has been performed.
HTTP/MIME line endings are CRLF. Request URL context, where labelled, is commentary rather than a wire field. No message was transmitted.
GET /samples/archive.bin HTTP/1.1
Host: media.example.invalid
Range: bytes=2048-
If-Range: "archive-r7"
Check the interpretation
- Reject weak tags for this field.
- Treat 200 as a replacement path.
- Confirm a returned 206 begins at the expected offset.