FAILURE MAP
← Case archive

FA-26716 / HTTP ranges / Open access

Chunked transfer coding removes fixed body length metadata · case 01

Chunked transfer coding removes fixed body length metadata.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

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 fixtureActualExpectedOutcome
content-length-transfer-coding-removal fixture 01NoneFailed
content-length-transfer-coding-removal fixture 100Passed
content-length-transfer-coding-removal fixture 211Passed
content-length-transfer-coding-removal fixture 30NoneFailed
content-length-transfer-coding-removal fixture 422Passed
content-length-transfer-coding-removal fixture 52NoneFailed

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 fixtureActualExpectedOutcome
content-length-transfer-coding-removal fixture 0NoneNonePassed
content-length-transfer-coding-removal fixture 1None0Failed
content-length-transfer-coding-removal fixture 211Passed
content-length-transfer-coding-removal fixture 3NoneNonePassed
content-length-transfer-coding-removal fixture 422Passed
content-length-transfer-coding-removal fixture 5NoneNonePassed

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 fixtureActualExpectedOutcome
content-length-transfer-coding-removal fixture 0NoneNonePassed
content-length-transfer-coding-removal fixture 100Passed
content-length-transfer-coding-removal fixture 211Passed
content-length-transfer-coding-removal fixture 3NoneNonePassed
content-length-transfer-coding-removal fixture 422Passed
content-length-transfer-coding-removal fixture 5NoneNonePassed

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