The full resource bytes anchor the slice.

highlighted = computed this step

The full resource has eight bytes

The resource row counts 8 bytes before the slice is taken.

resource bytes=8\text{resource bytes}=8
Full resource bytesThe request, full resource bytes, selected slice, response, and checks are recomputed from pinned bytes.Full resource bytes - GET /file.txt bytes 2-5 -> cdef (4 bytes)sectionnamevaluecheckrequest linemethodGETparsedrequest linepath/file.txtparsedrequest lineversionHTTP/1.1parsedheaderHoststatic.exampleexactheaderRangebytes=2-5requested sliceresourcedisplayabcdefghsafe display formresourceexact hex6162636465666768pinned bytesresourcebyte length8countedrangestart2inclusiverangeend5inclusiverangeoffsets2,3,4,5selectedslicedisplayc d e fsafe display formsliceexact hex63646566pinned bytesslicebyte length4countedstatusversionHTTP/1.1parsedstatusstatus206 Partial Contentpartial contentheaderContent-Rangebytes 2-5/8slice over totalheaderContent-Length4declared bytesbodydisplaycdefsafe display formbodyexact hex63646566pinned bytescheckrangebytes 2-5requestcheckcovered bytes4inclusive countchecktotal length8Content-RangecheckContent-Length4selected bodycheckmatchyesall counts agree

The resource hex is exact

The exact resource bytes are represented by the recomputed hex row.

resource hex checked\text{resource hex checked}
Full resource bytesThe request, full resource bytes, selected slice, response, and checks are recomputed from pinned bytes.Full resource bytes - GET /file.txt bytes 2-5 -> cdef (4 bytes)sectionnamevaluecheckrequest linemethodGETparsedrequest linepath/file.txtparsedrequest lineversionHTTP/1.1parsedheaderHoststatic.exampleexactheaderRangebytes=2-5requested sliceresourcedisplayabcdefghsafe display formresourceexact hex6162636465666768pinned bytesresourcebyte length8countedrangestart2inclusiverangeend5inclusiverangeoffsets2,3,4,5selectedslicedisplayc d e fsafe display formsliceexact hex63646566pinned bytesslicebyte length4countedstatusversionHTTP/1.1parsedstatusstatus206 Partial Contentpartial contentheaderContent-Rangebytes 2-5/8slice over totalheaderContent-Length4declared bytesbodydisplaycdefsafe display formbodyexact hex63646566pinned bytescheckrangebytes 2-5requestcheckcovered bytes4inclusive countchecktotal length8Content-RangecheckContent-Length4selected bodycheckmatchyesall counts agree

Offsets point into that resource

The selected offsets are read against the pinned resource bytes, not against prose.

offsets use resource bytes\text{offsets use resource bytes}
Full resource bytesThe request, full resource bytes, selected slice, response, and checks are recomputed from pinned bytes.Full resource bytes - GET /file.txt bytes 2-5 -> cdef (4 bytes)sectionnamevaluecheckrequest linemethodGETparsedrequest linepath/file.txtparsedrequest lineversionHTTP/1.1parsedheaderHoststatic.exampleexactheaderRangebytes=2-5requested sliceresourcedisplayabcdefghsafe display formresourceexact hex6162636465666768pinned bytesresourcebyte length8countedrangestart2inclusiverangeend5inclusiverangeoffsets2,3,4,5selectedslicedisplayc d e fsafe display formsliceexact hex63646566pinned bytesslicebyte length4countedstatusversionHTTP/1.1parsedstatusstatus206 Partial Contentpartial contentheaderContent-Rangebytes 2-5/8slice over totalheaderContent-Length4declared bytesbodydisplaycdefsafe display formbodyexact hex63646566pinned bytescheckrangebytes 2-5requestcheckcovered bytes4inclusive countchecktotal length8Content-RangecheckContent-Length4selected bodycheckmatchyesall counts agree

Summary

The Range header only makes sense after the full resource bytes are known.

resource anchors range\text{resource anchors range}
Full resource bytesThe request, full resource bytes, selected slice, response, and checks are recomputed from pinned bytes.Full resource bytes - GET /file.txt bytes 2-5 -> cdef (4 bytes)sectionnamevaluecheckrequest linemethodGETparsedrequest linepath/file.txtparsedrequest lineversionHTTP/1.1parsedheaderHoststatic.exampleexactheaderRangebytes=2-5requested sliceresourcedisplayabcdefghsafe display formresourceexact hex6162636465666768pinned bytesresourcebyte length8countedrangestart2inclusiverangeend5inclusiverangeoffsets2,3,4,5selectedslicedisplayc d e fsafe display formsliceexact hex63646566pinned bytesslicebyte length4countedstatusversionHTTP/1.1parsedstatusstatus206 Partial Contentpartial contentheaderContent-Rangebytes 2-5/8slice over totalheaderContent-Length4declared bytesbodydisplaycdefsafe display formbodyexact hex63646566pinned bytescheckrangebytes 2-5requestcheckcovered bytes4inclusive countchecktotal length8Content-RangecheckContent-Length4selected bodycheckmatchyesall counts agree