An image review tool retrieves a slice of a known test file for its preview. The preview works, but the exported file still needs its own check. A partial response cannot prove that the complete representation arrived intact.

Reference: RFC 9110 range units. HTTP semantics describes ranges of representation data and byte-range conventions.

Validate Range Responses

Write down what the local test service supports. A server can ignore a Range request and return the complete representation; the client must distinguish that from a partial response. For a supported single byte range, check the 206 status, the Content-Range information and the bytes delivered against the known fixture. The endpoints in the byte-range syntax are inclusive. For a full download, check the received representation separately. Do not require a Content-Length header in situations where the documented delivery method does not need one; verify the actual received content.

Test Partial vs Full

Use a small known file in an authorized fixture, with distinguishable bytes at each position. Request bytes 10 through 20 and expect eleven bytes if that range is supported. Compare the slice and its declared positions, then make a separate full request and compare the complete file. Try the agreed behavior when the fixture ignores the range and sends the full response. The client must not mistake it for a slice or append it to another fragment. If the output promises a complete file, verify the file that will actually be opened.

Name a failing layer in the review: the preview request, the full download or the local file assembly. A good preview is a useful result, but it should not count as a verified full export.

Record the expected file identity as well as its size so a same-length substitution does not pass the full check.

Test the downloaded file with the intended viewer after comparing the bytes. Transport checks and a usable preview answer different questions.