Mechanism and synthetic fixture
The saved bytes come from v1, ABCDEFGH. Version v2 is 12345678. With four saved bytes, appending a v2 suffix produces the invalid hybrid ABCD5678. A correct client binds its partial copy to one representation and treats a complete 200 response as replacement.
Strict mode restarts with a full request when the saved validator is weak or absent. The server fault controls affect range responses; a full request receives a complete representation except for the explicit 416 fixture. Every byte is ASCII so character count equals byte count in this model.
Try prefix lengths zero and seven to inspect the boundary decisions. Zero requires no resume; seven leaves a one-byte suffix. A response can have the expected total length and still contain the wrong bytes, which is why the result compares exact synthetic contents rather than just length. Refusal preserves the old partial prefix but never labels it a complete artifact.
Related guide: Give numeric tool results explicit units. This lab counts bytes of one selected representation, a specific quantity that cannot safely be replaced with an unrelated character or decoded-text count.
Adjust the experiment
What to try and expected outcomes
- Defaults: 206 is appended to produce ABCDEFGH.
- Choose v2: the matching condition fails; 200 replaces the prefix with 12345678.
- Choose Append every success with v2: the result is corrupt and longer than the current object.
- Restore strict mode and v1; test wrong offset, truncated body and wrong ETag: each response is refused.
- Choose weak or missing ETag in strict mode: a full request replaces the partial copy.
- Choose 416: no complete artifact is accepted.
Key takeaway: A resumed artifact must contain bytes from one representation.
Decision trace
| Step | Event | Detail | Decision |
|---|
Limits and authorship
Deterministic single-range protocol calculation. No network request or filesystem write occurs. Only eight-byte ASCII objects and strong entity tags are supported for resumption. No multipart ranges, date validators, content-encoding negotiation, cryptographic digest or crash-safe file promotion is modeled.
Original explanation, code and synthetic fixtures by Sandeep Belgavi. Views are my own and do not represent any employer, past or present.