A public download can have the correct name and checksum when fetched whole yet fail when a client resumes it. Verify the range-response contract separately from release identity. The question is whether the endpoint returns the requested bytes and truthful range metadata, or deliberately ignores the range and returns a complete representation.
Use a harmless small fixture before testing a real large asset. The release identity review establishes which approved file the documentation should reference. This exercise establishes how that representation is transferred in pieces.
Do not execute downloaded software as part of a transport test. Preserve the byte sequence as received and compare it with the approved fixture. Line-ending conversions, text decoding and automatic decompression can change what a tool exposes, so record the client’s behavior.
Define a deterministic 1000-byte fixture
Create a local file by concatenating the four-digit ASCII records 0000 through 0249, with no separator or newline. In Python, the complete expression is b''.join(f'{i:04d}'.encode('ascii') for i in range(250)). There are 250records of four bytes each, so the complete file is 1000 bytes. Byte positions are zero-based: the first byte has offset 0 and the last has offset 999. A range 0–99 therefore contains 100 bytes, not 99.
Use one unchanged representation for the whole test. Avoid a response that varies with authentication, language or content encoding while comparing ranges. Record the complete response’s digest and the request headers so partial responses refer to the same object.
RFC 9110 sections 14 and 15 defines Range, Content-Range and the 206/416 responses. A server may ignore a Range request. Therefore, a complete 200 response is not automatically a range-protocol violation. Your product may nevertheless require resumable downloads;that is a separate acceptance requirement to state explicitly.
Run the full response matrix
The following table describes a server configured to support single byte ranges for this fixture. It intentionally leaves multipart ranges outside the contract. If the real service supports them, add separate boundary and assembly tests rather than guessing their format.
| Request Range | Expected supported response | Bytes and metadata |
|---|---|---|
| Absent | 200 | Complete 1000-byte file |
| bytes=0-99 | 206 | 100 bytes;Content-Range: bytes 0-99/1000 |
| bytes=100-199 | 206 | 100 bytes;Content-Range: bytes 100-199/1000 |
| bytes=-100 | 206 | Last 100 bytes;Content-Range: bytes 900-999/1000 |
| bytes=950- | 206 | 50 bytes;Content-Range: bytes 950-999/1000 |
| bytes=1000- | 416 for this fixture | No satisfiable bytes;Content-Range: bytes */1000 |
Compare returned content with the corresponding slice of the approved file. A response can have plausible headers and wrong bytes. Conversely, a client may expose decoded content rather than the encoded representation whose range was selected;keep encodings controlled before interpreting a mismatch.
Distinguish ignored ranges from broken partial responses
Add a second local endpoint that deliberately ignores Range and returns 200 with the complete 1000-byte representation. The test should classify it as range ignored, not silently append those 1000 bytes to an existing partial file. A resume client that assumes every successful response contains only the missing suffix can corrupt its local output.
A 206 carrying the entire 1000-byte file while declaring bytes 0–99/1000 is a different defect. Its declared range and actual content disagree. A 416 for bytes 0–99 on this 1000-byte object also needs investigation because that request is satisfiable under the fixture’s conditions.
Treat Accept-Ranges as useful advertisement, not the entire test. Actual responses establish behavior. Preserve status, Content-Range, Content-Length when present, Content-Encoding and the exact received bytes. Report absent headers as absent rather than filling expected values into the observed column.
Test resumed identity with a changed representation
A resume operation also needs to know whether the object changed between requests. For an authorized local test, create version A and version B with different bytes and distinct strong validators. Save the first part of A, then ask for a later range using an If-Range condition tied to A after B becomes current.
Under the applicable HTTP condition, the server can send the complete current representation rather than a partial range when the validator does not match. The client must replace its prior partial object rather than combine A and B. Consult the RFC’s exact validator requirements;do not invent an arbitrary filename as an If-Range value.
This is a transport identity check, not a claim that the new file is trustworthy. The approved release reference remains necessary. A perfect reconstruction of the wrong release still fails the documentation’s intended version.
Keep caches and transformations in the record
Test the ordinary delivery URL after the local fixture passes. A proxy can ignore ranges, transform content or serve a different release object. Record redirects and the final representation identity. Do not compare a range from the origin with a whole file from an unrelated CDN variant as though they were guaranteed identical.
If Content-Length appears on a 206 response, it describes that response content’s length, not necessarily the whole object’s size. The complete-size denominator belongs in Content-Range for the shown fixture. Use the validator review when object freshness is uncertain.
For a public page that links the file, also confirm the link still names the intended artifact. The versioned documentation policy separates supported older assets from accidental stale downloads.
Preserve a reconstruction check in the fixture
A small deterministic script can create the reference without downloading any executable. Generate the consecutive four-digit records using the expression above, and assert that the resulting length equals one thousand before serving it. Each hundred-byte interval has a different sequence of records, so a shifted response cannot pass merely because the reference repeats the same short pattern. For each successful partial response, compare the returned bytes with reference[start: end+1], using the inclusive end offset from Content-Range.
To test a complete resume, request positions zero through four hundred ninety-nine and then five hundred through nine hundred ninety-nine from the unchanged fixture. Each part contains five hundred bytes. Concatenate them in order and compare the complete result with the reference, not merely its length. Two wrong halves can still have the expected total length. As a negative fixture, swap the two halves;the complete-byte comparison must fail even though the length remains one thousand.
Keep the deliberately ignored-range endpoint in this test too. The client must identify its complete 200 response before deciding whether to replace a partial local object. A transport test should catch corruption rather than quietly accepting a file because its name looks right.
Define the acceptance result
The release record should say whether range support is required, whether the endpoint supports or ignores it, and whether every tested partial response agrees with its declared interval and approved object. Preserve the unsatisfiable-boundary case so an off-by-one error does not disappear from later tests.
For this fixture,0–99 and 100–199 each contain 100 bytes;950–999 contains 50;the complete object contains 1000. A client that assembles all ten nonoverlapping 100-byte intervals in order should reproduce the complete fixture exactly. That is an additional deterministic check, not a real production measurement.
Approve the transport behavior only after the actual response matrix passes. Keep subsequent software safety, compatibility and installation testing under their own release gates.
