Byte-range request
A byte-range request asks an HTTP server to return selected byte intervals of a representation instead of its complete content.
Offsets start at zero and include both endpoints; bytes=0-9 requests ten bytes. Ranges address the encoded representation when content coding is applied. Keep representation identity separate from range coverage and checksum verification. Automatic content decoding changes the local output without rewriting saved HTTP response headers. Full decoded output does not establish that a range covered the complete encoded object or its gzip trailer.
Relations
Advantages
Limitations
- A server can ignore Range and return 200; do not append that full response as a missing fragment. [1]
- If-Range cannot use a weak ETag; a failed comparison makes the server ignore Range, unlike a failed If-Match precondition. Use an HTTP-date only when no ETag is available and the date qualifies as a strong validator. [1]
- S3 GetObject supports one range per request; use its documented versionId or If-Match controls rather than assuming If-Range support. [2]
- Decompressive transcoding can turn a range request into an entire object transfer; a checksum of the complete stored object does not validate a selected or decoded interval. [4, 5]
- Pinning a stored data generation does not freeze editable metadata; when metadata controls the representation, bind its revision too and check each response's coding before assembly. [5, 6]
- A client's successful partial response does not establish whole-container validation; check encoded interval coverage separately from decoded output identity and final client status. [1, 7, 8]
Citations
- RFC 9110: If-Range and range requests, sections 13.1.5 and 14
- Amazon S3 API: GetObject, Range, If-Match and versionId
- Google Cloud Storage: gzip transcoding and Range behavior
- Google Cloud Storage XML API: object download and checksum coverage
- Google Cloud Storage: editable metadata, generation and metageneration
- libcurl CURLOPT_ACCEPT_ENCODING: decoding and Content-Length accounting
- Hesela: complete decoded output is not a completed archive check
- Hesela: nine retained HTTP decoding observations, curl 8.5.0
Further reading
Sources & caveats
- The transcoding example is specific to Google Cloud Storage; the checksum coverage statement uses its XML API. [4] [5]
- The generation/metageneration distinction is specific to Google Cloud Storage; its XML download API exposes x-goog-if-metageneration-match. [5] [6]
- Hesela's nine-case loopback curl 8.5.0 experiment retained complete decoded output with exit 61 for a wrong full-response gzip CRC and exit 0 when the trailer was excluded. The payload itself remained correct; this is not an S3/GCS test or a claim about all curl versions. [8] [9]