FA-26716 / HTTP ranges / Open access
Chunked transfer coding removes fixed body length metadata · case 01
Chunked transfer coding removes fixed body length metadata.
ROOT CAUSE
The content-length-transfer-coding-removal decision uses return length.
VERIFIED REPAIR
Apply the bounded decision exactly: return None if chunked else length
Unsuccessful approach: The partial repair uses return None if chunked or length==0 else length, which still violates the stated contract.
Case contract
Return null Content-Length for chunked transport; otherwise preserve integer length including zero.
Why this case matters
Range responses combine representation identity, conditional requests, framing, and partial-object state.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(chunked, length):
return length
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('content-length-transfer-coding-removal fixture 0', solve(True,N), None)
check('content-length-transfer-coding-removal fixture 1', solve(False,0), 0)
check('content-length-transfer-coding-removal fixture 2', solve(False,N), N)
check('content-length-transfer-coding-removal fixture 3', solve(True,0), None)
check('content-length-transfer-coding-removal fixture 4', solve(False,2*N), 2*N)
check('content-length-transfer-coding-removal fixture 5', solve(True,2*N), None)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| content-length-transfer-coding-removal fixture 0 | 1 | None | Failed |
| content-length-transfer-coding-removal fixture 1 | 0 | 0 | Passed |
| content-length-transfer-coding-removal fixture 2 | 1 | 1 | Passed |
| content-length-transfer-coding-removal fixture 3 | 0 | None | Failed |
| content-length-transfer-coding-removal fixture 4 | 2 | 2 | Passed |
| content-length-transfer-coding-removal fixture 5 | 2 | None | Failed |
SHA-256 / dadaf8db3de7fd1bfe6fe842eb1b424a4b3d5c8b8ce5fca0265f9c36b9a85844
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(chunked, length):
return None if chunked or length==0 else length
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('content-length-transfer-coding-removal fixture 0', solve(True,N), None)
check('content-length-transfer-coding-removal fixture 1', solve(False,0), 0)
check('content-length-transfer-coding-removal fixture 2', solve(False,N), N)
check('content-length-transfer-coding-removal fixture 3', solve(True,0), None)
check('content-length-transfer-coding-removal fixture 4', solve(False,2*N), 2*N)
check('content-length-transfer-coding-removal fixture 5', solve(True,2*N), None)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| content-length-transfer-coding-removal fixture 0 | None | None | Passed |
| content-length-transfer-coding-removal fixture 1 | None | 0 | Failed |
| content-length-transfer-coding-removal fixture 2 | 1 | 1 | Passed |
| content-length-transfer-coding-removal fixture 3 | None | None | Passed |
| content-length-transfer-coding-removal fixture 4 | 2 | 2 | Passed |
| content-length-transfer-coding-removal fixture 5 | None | None | Passed |
SHA-256 / bbc2cab77288f7c218177e308b1608f0449bf43412e176385c0f0e5c487f414d
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(chunked, length):
return None if chunked else length
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('content-length-transfer-coding-removal fixture 0', solve(True,N), None)
check('content-length-transfer-coding-removal fixture 1', solve(False,0), 0)
check('content-length-transfer-coding-removal fixture 2', solve(False,N), N)
check('content-length-transfer-coding-removal fixture 3', solve(True,0), None)
check('content-length-transfer-coding-removal fixture 4', solve(False,2*N), 2*N)
check('content-length-transfer-coding-removal fixture 5', solve(True,2*N), None)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| content-length-transfer-coding-removal fixture 0 | None | None | Passed |
| content-length-transfer-coding-removal fixture 1 | 0 | 0 | Passed |
| content-length-transfer-coding-removal fixture 2 | 1 | 1 | Passed |
| content-length-transfer-coding-removal fixture 3 | None | None | Passed |
| content-length-transfer-coding-removal fixture 4 | 2 | 2 | Passed |
| content-length-transfer-coding-removal fixture 5 | None | None | Passed |
SHA-256 / 172ac0301979052ffc1e5a0143dd6231de54192d242a2b05e4d823b6b25e2171
Verification & scope
Deterministic simplified range service, with stipulated local policies and already parsed trusted inputs; not a complete HTTP implementation. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:41:18.435502+00:00.
Case digest / 2f1510307d83fe9ea17108b3779b4554f6d2e6c9db3b29847a12bfe369efd3f8