FAILURE MAP
← Case archive

FA-26811 / HTTP ranges / Open access

Part header lookup normalizes names without rewriting values · case 01

Part header lookup normalizes names without rewriting values.

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

ROOT CAUSE

The multipart-client-header-case decision uses return next((v for k,v in headers if k==name),None).

VERIFIED REPAIR

Apply the bounded decision exactly: return next((v for k,v in headers if k.lower()==name.lower()),None)

Unsuccessful approach: The partial repair uses return next((v.lower() for k,v in headers if k.lower()==name.lower()),None), which still violates the stated contract.

Case contract

Parsed headers are [name,value], unique ignoring case. Return exact value of case-insensitive matching name, else None.

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(headers, name):
    return next((v for k,v in headers if k==name),None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multipart-client-header-case fixture 0', solve([["Content-Range","Bytes "+str(N)]],"content-range"), "Bytes "+str(N))
check('multipart-client-header-case fixture 1', solve([["content-type","Text/X"]],"CONTENT-TYPE"), "Text/X")
check('multipart-client-header-case fixture 2', solve([],"content-range"), None)
check('multipart-client-header-case fixture 3', solve([["x","A"]],"x"), "A")
check('multipart-client-header-case fixture 4', solve([["x","A"]],"y"), None)
check('multipart-client-header-case fixture 5', solve([["CONTENT-RANGE",""]],"content-range"), "")
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
multipart-client-header-case fixture 0NoneBytes 1Failed
multipart-client-header-case fixture 1NoneText/XFailed
multipart-client-header-case fixture 2NoneNonePassed
multipart-client-header-case fixture 3AAPassed
multipart-client-header-case fixture 4NoneNonePassed
multipart-client-header-case fixture 5NoneFailed

SHA-256 / aaf7e5c22cd83ee57ea04ba3214739727a69cd438c530e764924dfab3d1ea674

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(headers, name):
    return next((v.lower() for k,v in headers if k.lower()==name.lower()),None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multipart-client-header-case fixture 0', solve([["Content-Range","Bytes "+str(N)]],"content-range"), "Bytes "+str(N))
check('multipart-client-header-case fixture 1', solve([["content-type","Text/X"]],"CONTENT-TYPE"), "Text/X")
check('multipart-client-header-case fixture 2', solve([],"content-range"), None)
check('multipart-client-header-case fixture 3', solve([["x","A"]],"x"), "A")
check('multipart-client-header-case fixture 4', solve([["x","A"]],"y"), None)
check('multipart-client-header-case fixture 5', solve([["CONTENT-RANGE",""]],"content-range"), "")
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
multipart-client-header-case fixture 0bytes 1Bytes 1Failed
multipart-client-header-case fixture 1text/xText/XFailed
multipart-client-header-case fixture 2NoneNonePassed
multipart-client-header-case fixture 3aAFailed
multipart-client-header-case fixture 4NoneNonePassed
multipart-client-header-case fixture 5Passed

SHA-256 / 873331b3673250c5956ab2bf700a33726ad3c3e4796188ef3a229d458b44316a

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(headers, name):
    return next((v for k,v in headers if k.lower()==name.lower()),None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multipart-client-header-case fixture 0', solve([["Content-Range","Bytes "+str(N)]],"content-range"), "Bytes "+str(N))
check('multipart-client-header-case fixture 1', solve([["content-type","Text/X"]],"CONTENT-TYPE"), "Text/X")
check('multipart-client-header-case fixture 2', solve([],"content-range"), None)
check('multipart-client-header-case fixture 3', solve([["x","A"]],"x"), "A")
check('multipart-client-header-case fixture 4', solve([["x","A"]],"y"), None)
check('multipart-client-header-case fixture 5', solve([["CONTENT-RANGE",""]],"content-range"), "")
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
multipart-client-header-case fixture 0Bytes 1Bytes 1Passed
multipart-client-header-case fixture 1Text/XText/XPassed
multipart-client-header-case fixture 2NoneNonePassed
multipart-client-header-case fixture 3AAPassed
multipart-client-header-case fixture 4NoneNonePassed
multipart-client-header-case fixture 5Passed

SHA-256 / 2dea47a9320d1175852868c7d9295639fc506d90abe579c0b242e65fe4448f91

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:19.363406+00:00.

Case digest / 24e3851b8d65bc17d582e8f0781132770cff3511defc27ae2f68b805fe6548e2