Applies to: Protocol and format interpretation for developers inspecting authorized media delivery.
The useful distinctions
- A 206 response can satisfy one or several requested ranges.
- A single-range response carries its interval in Content-Range.
- Multiple ranges can use multipart/byteranges with per-part interval fields.
Count payloads before counting bytes
A client asking for two separated pieces of an object should expect to identify two pieces in the result. The envelope is part of how those pieces are communicated; it is not extra content from the original media object. In the example, one requested piece has four bytes and the other has three. Their seven combined object bytes are different from the size of the complete multipart HTTP content, which also contains boundaries and part headers.
Keep the parser responsibilities explicit
A useful inspection worksheet has a row for each part: starting offset, ending offset, extracted byte count, and representation identity. Reconstructing an object requires placing extracted payloads at those offsets, not appending the entire HTTP content to a file. The small synthetic body makes that distinction visible without involving binary media. If an implementation only supports one interval at a time, keep that limitation explicit in the client design. Do not assume a range-capable origin will always choose the multipart shape you expected. Compare the actual response content type before deciding which decoding path to use. A reconstruction diagram for the example would leave offsets four through nine and thirteen through nineteen unfilled. Seven extracted bytes do not constitute a complete twenty-byte object, even after correct envelope removal.
Worked example · synthetic
This complete synthetic HTTP/1.1 response uses connection-close framing. The extracted object pieces are ABCD at offsets 0–3 and KLM at offsets 10–12; boundary lines are not object bytes.
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.
HTTP/1.1 206 Partial Content
Date: Sun, 08 Nov 2026 08:00:00 GMT
Content-Type: multipart/byteranges; boundary=demo_boundary
Connection: close
--demo_boundary
Content-Type: application/octet-stream
Content-Range: bytes 0-3/20
ABCD
--demo_boundary
Content-Type: application/octet-stream
Content-Range: bytes 10-12/20
KLM
--demo_boundary--
Check the interpretation
- Parse the multipart content type before extraction.
- Check each inclusive part length.
- Preserve CRLF line endings when serializing this HTTP/MIME example.