Home / Market / http range response testing

http range response testing

Verify HTTP byte-range server behavior on deterministic loopback routes across 206 Partial Content, Content-Range, 416, If-Range validators, suffix/open ranges, and multi-range.

skill★ 508790 dlgithubCC-BY-4.0 content; MIT code; upstream exceptions applyInstall in CosmosUpstream Source

Documentation & Preview

--- name: http-range-response-testing description: "Verify HTTP byte-range server behavior on deterministic loopback routes across 206 Partial Content, Content-Range, 416, If-Range validators, suffix/open ranges, and multi-range." category: development risk: safe source: self source_type: self date_added: "2026-12-01" author: Koushik-Katkam tags: [http, rfc9110, range-requests, partial-content, testing, api]

---

HTTP Range Response Testing

Overview

Run deterministic loopback HTTP tests grounded in RFC 9110 (HTTP Semantics, Sections 13.1.5 & 14) for endpoints that explicitly promise byte-range support (Accept-Ranges: bytes). Verifies exact response bytes, inclusive boundaries, open-ended and suffix ranges, 206 Partial Content + Content-Range, 416 Range Not Satisfiable, matching vs. stale If-Range, 200 OK fallback semantics, Content-Length consistency, and optional multipart/byteranges support.

Distinction from existing skills:

When to Use

Prerequisites

How It Works

1. Distinguish RFC-permitted behavior from route promises

2. Exercise bounded loopback fixtures

Run the local suite in HTTP range loopback harness:

  1. Exact slices & inclusive boundaries: bytes=0-4 returns 206, Content-Range: bytes 0-4/32, Content-Length: 5, and exact 5 bytes (payload[0:5]); single-byte bytes=7-7 returns 1 byte (bytes 7-7/32).
  2. Open-ended & suffix ranges: bytes=20- returns bytes 20-31/32 (12 bytes); bytes=-6 returns the trailing 6 bytes (bytes 26-31/32); oversized suffix bytes=-999 clamps to bytes 0-31/32.
  3. Unsatisfiable ranges (416): bytes=99-120 on a 32-byte payload returns 416, Content-Range: bytes */32, and empty body; malformed syntactic ranges (bytes=10-5 or unsupported units items=0-2) do not return 206.
  4. Conditional If-Range (RFC 9110 §13.1.5): Matching ETag returns 206 slice; stale/mismatched ETag forces 200 OK full representation with no Content-Range.
  5. Multiple ranges (multipart/byteranges): On routes declaring multi-range support, Range: bytes=0-3, 10-12 returns 206, Content-Type: multipart/byteranges; boundary=..., valid part Content-Range headers, exact byte slices, and consistent outer Content-Length.
  6. Non-vacuous negative mutations: Verify intentional bugs (off_by_one, stale_if_range_206, wrong_416_status, bad_content_length) fail loudly.

Examples

Run the self-contained verification suite in HTTP range loopback harness:

User request: "Test our artifact download endpoint for RFC 9110 Range, If-Range, and 416 correctness."
Inputs: Loopback HTTP route fixture (127.0.0.1:0, 32-byte payload, ETag '"v1-payload"').
Expected result: All inclusive, open-ended, suffix, If-Range (match=206, stale=200), 416, fallback,
  and multipart/byteranges assertions pass; broken server mutations (off-by-one, bad Content-Length,
  stale If-Range 206, missing 416 Content-Range) fail with concrete diagnostic errors.

Limitations

Safety and Side Effects

Sources and related skills