FAILURE MAP
← Case archive

FA-26666 / HTTP ranges / Open access

Only outer optional whitespace is accepted around range unit tokens · case 01

Only outer optional whitespace is accepted around range unit tokens.

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

ROOT CAUSE

The range-unit-whitespace decision uses return "bytes" if "".join(unit.split()).lower()=="bytes" else None.

THE FAILURE

The range-unit-whitespace decision uses return "bytes" if "".join(unit.split()).lower()=="bytes" else None.

Unsuccessful approach: The partial repair uses return "bytes" if unit.lower()=="bytes" else None, which still violates the stated contract.

Case contract

Trim spaces and tabs around unit; return bytes only for exact case-insensitive bytes token afterward, otherwise None. Interior whitespace is invalid.

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(unit):
    return "bytes" if "".join(unit.split()).lower()=="bytes" else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('range-unit-whitespace fixture 0', solve("by tes"), None)
check('range-unit-whitespace fixture 1', solve(" \tBYTES \t"), "bytes")
check('range-unit-whitespace fixture 2', solve("bytes"), "bytes")
check('range-unit-whitespace fixture 3', solve("items"), None)
check('range-unit-whitespace fixture 4', solve("bytes"+" "*N), "bytes")
check('range-unit-whitespace fixture 5', solve("byte\ns"), 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
range-unit-whitespace fixture 0bytesNoneFailed
range-unit-whitespace fixture 1bytesbytesPassed
range-unit-whitespace fixture 2bytesbytesPassed
range-unit-whitespace fixture 3NoneNonePassed
range-unit-whitespace fixture 4bytesbytesPassed
range-unit-whitespace fixture 5bytesNoneFailed

SHA-256 / 0b1870a1ddbd785767eb91610647abdc2f0ea873ee06911f4c89a1a25be193e5

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(unit):
    return "bytes" if unit.lower()=="bytes" else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('range-unit-whitespace fixture 0', solve("by tes"), None)
check('range-unit-whitespace fixture 1', solve(" \tBYTES \t"), "bytes")
check('range-unit-whitespace fixture 2', solve("bytes"), "bytes")
check('range-unit-whitespace fixture 3', solve("items"), None)
check('range-unit-whitespace fixture 4', solve("bytes"+" "*N), "bytes")
check('range-unit-whitespace fixture 5', solve("byte\ns"), 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
range-unit-whitespace fixture 0NoneNonePassed
range-unit-whitespace fixture 1NonebytesFailed
range-unit-whitespace fixture 2bytesbytesPassed
range-unit-whitespace fixture 3NoneNonePassed
range-unit-whitespace fixture 4NonebytesFailed
range-unit-whitespace fixture 5NoneNonePassed

SHA-256 / e257aae12dd68b137c976675fc61a26156ffc37e4f112d0c75c50d69140bd4aa

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / ac0554e1c91bd1c46049fea785d9811c14c02d6f79170ca02a84dfdabaae53fa