FA-26836 / HTTP ranges / Open access
Range body whitespace remains byte-exact after framing removal · case 01
Range body whitespace remains byte-exact after framing removal.
ROOT CAUSE
The multipart-client-body-not-strip decision uses return framed.strip().
VERIFIED REPAIR
Apply the bounded decision exactly: return framed[:-2]
Unsuccessful approach: The partial repair uses return framed.rstrip("\r\n"), which still violates the stated contract.
Case contract
framed ends with exactly one framing CRLF. Return all preceding payload bytes; do not trim payload whitespace.
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(framed):
return framed.strip()
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multipart-client-body-not-strip fixture 0', solve("p"*N+"\r\n\r\n"), "p"*N+"\r\n")
check('multipart-client-body-not-strip fixture 1', solve(" p \r\n"), " p ")
check('multipart-client-body-not-strip fixture 2', solve("\r\n"), "")
check('multipart-client-body-not-strip fixture 3', solve("p\r\n"), "p")
check('multipart-client-body-not-strip fixture 4', solve("p\n\r\n"), "p\n")
check('multipart-client-body-not-strip fixture 5', solve("p\r\r\n"), "p\r")
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 |
|---|---|---|---|
| multipart-client-body-not-strip fixture 0 | p | p
| Failed |
| multipart-client-body-not-strip fixture 1 | p | p | Failed |
| multipart-client-body-not-strip fixture 2 | | | Passed |
| multipart-client-body-not-strip fixture 3 | p | p | Passed |
| multipart-client-body-not-strip fixture 4 | p | p
| Failed |
| multipart-client-body-not-strip fixture 5 | p | p
| Failed |
SHA-256 / 6ae413270fa264e97789d05acb680f858a244d646900cd0034a296b83844506c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(framed):
return framed.rstrip("\r\n")
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multipart-client-body-not-strip fixture 0', solve("p"*N+"\r\n\r\n"), "p"*N+"\r\n")
check('multipart-client-body-not-strip fixture 1', solve(" p \r\n"), " p ")
check('multipart-client-body-not-strip fixture 2', solve("\r\n"), "")
check('multipart-client-body-not-strip fixture 3', solve("p\r\n"), "p")
check('multipart-client-body-not-strip fixture 4', solve("p\n\r\n"), "p\n")
check('multipart-client-body-not-strip fixture 5', solve("p\r\r\n"), "p\r")
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 |
|---|---|---|---|
| multipart-client-body-not-strip fixture 0 | p | p
| Failed |
| multipart-client-body-not-strip fixture 1 | p | p | Passed |
| multipart-client-body-not-strip fixture 2 | | | Passed |
| multipart-client-body-not-strip fixture 3 | p | p | Passed |
| multipart-client-body-not-strip fixture 4 | p | p
| Failed |
| multipart-client-body-not-strip fixture 5 | p | p
| Failed |
SHA-256 / 3482a9129a26b9c26eaa143ed903f22ba1770a92e4eb7cbfcb0e0e74aa22c0c7
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(framed):
return framed[:-2]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multipart-client-body-not-strip fixture 0', solve("p"*N+"\r\n\r\n"), "p"*N+"\r\n")
check('multipart-client-body-not-strip fixture 1', solve(" p \r\n"), " p ")
check('multipart-client-body-not-strip fixture 2', solve("\r\n"), "")
check('multipart-client-body-not-strip fixture 3', solve("p\r\n"), "p")
check('multipart-client-body-not-strip fixture 4', solve("p\n\r\n"), "p\n")
check('multipart-client-body-not-strip fixture 5', solve("p\r\r\n"), "p\r")
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 |
|---|---|---|---|
| multipart-client-body-not-strip fixture 0 | p
| p
| Passed |
| multipart-client-body-not-strip fixture 1 | p | p | Passed |
| multipart-client-body-not-strip fixture 2 | | | Passed |
| multipart-client-body-not-strip fixture 3 | p | p | Passed |
| multipart-client-body-not-strip fixture 4 | p
| p
| Passed |
| multipart-client-body-not-strip fixture 5 | p
| p
| Passed |
SHA-256 / 9f8e7b7d52f7f614f213272c3517b9a5a903d7c553aa795b7cc8a2fc055cb7ad
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.490887+00:00.
Case digest / 932b585b584cb9903d561c4cbd9c886e7393ba8b74f65136c5e409b2e43d9bf2