FA-27841 / HTTP redirects / Open access
Select an unambiguous Location field without losing raw syntax: case insensitive name · case 01
Differently cased Location names are lost.
ROOT CAUSE
The case-insensitive-name decision uses "[v for k,v in lines if k == 'Location']"; this violates the stipulated controller policy.
VERIFIED REPAIR
At this decision use "[v for k,v in lines if k.lower() == 'location']", preserving the other controller outputs.
Unsuccessful approach: The partial repair uses "[v for k,v in lines if k == 'location']" and still fails an explicit boundary or control.
Case contract
Select an unambiguous Location field without losing raw syntax. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.
Why this case matters
Models a redirect controller decision before following a target or exposing a redirect result.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, lines):
return {'request': request, 'decision': [[v for k,v in lines if k == 'Location'], len([v for k,v in lines if k.lower() == 'location']) > 1, [v.strip(' \t') for k,v in lines if k.lower() == 'location'], [v for k,v in lines if k.lower() == 'location'], 'missing' if not any(k.lower() == 'location' for k,v in lines) else 'present']}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', [('Location', ' /a,b '), ('X', 'z')]), {'request': '/requests/' + str(N) + '/0', 'decision': [[' /a,b '], False, ['/a,b'], [' /a,b '], 'present']})
check('fixture 2', solve('/requests/' + str(N) + '/1', [('location', '/a b')]), {'request': '/requests/' + str(N) + '/1', 'decision': [['/a b'], False, ['/a b'], ['/a b'], 'present']})
check('fixture 3', solve('/requests/' + str(N) + '/2', [('LOCATION', '')]), {'request': '/requests/' + str(N) + '/2', 'decision': [[''], False, [''], [''], 'present']})
check('fixture 4', solve('/requests/' + str(N) + '/3', [('X', 'z')]), {'request': '/requests/' + str(N) + '/3', 'decision': [[], False, [], [], 'missing']})
check('fixture 5', solve('/requests/' + str(N) + '/4', [('Location', '/a'), ('location', '/b')]), {'request': '/requests/' + str(N) + '/4', 'decision': [['/a', '/b'], True, ['/a', '/b'], ['/a', '/b'], 'present']})
check('fixture 6', solve('/requests/' + str(N) + '/5', []), {'request': '/requests/' + str(N) + '/5', 'decision': [[], False, [], [], 'missing']})
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 |
|---|---|---|---|
| fixture 1 | {'decision': [[' /a,b '], False, ['/a,b'], [' /a,b '], 'present'], 'request': '/requests/1/0'} | {'decision': [[' /a,b '], False, ['/a,b'], [' /a,b '], 'present'], 'request': '/requests/1/0'} | Passed |
| fixture 2 | {'decision': [[], False, ['/a b'], ['/a b'], 'present'], 'request': '/requests/1/1'} | {'decision': [['/a b'], False, ['/a b'], ['/a b'], 'present'], 'request': '/requests/1/1'} | Failed |
| fixture 3 | {'decision': [[], False, [''], [''], 'present'], 'request': '/requests/1/2'} | {'decision': [[''], False, [''], [''], 'present'], 'request': '/requests/1/2'} | Failed |
| fixture 4 | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/3'} | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/3'} | Passed |
| fixture 5 | {'decision': [['/a'], True, ['/a', '/b'], ['/a', '/b'], 'present'], 'request': '/requests/1/4'} | {'decision': [['/a', '/b'], True, ['/a', '/b'], ['/a', '/b'], 'present'], 'request': '/requests/1/4'} | Failed |
| fixture 6 | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/5'} | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/5'} | Passed |
SHA-256 / bdce3e5226b8d88957dc0d788921bad870f58cfb9dd32bb84ea26a0d0934f0d3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, lines):
return {'request': request, 'decision': [[v for k,v in lines if k == 'location'], len([v for k,v in lines if k.lower() == 'location']) > 1, [v.strip(' \t') for k,v in lines if k.lower() == 'location'], [v for k,v in lines if k.lower() == 'location'], 'missing' if not any(k.lower() == 'location' for k,v in lines) else 'present']}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', [('Location', ' /a,b '), ('X', 'z')]), {'request': '/requests/' + str(N) + '/0', 'decision': [[' /a,b '], False, ['/a,b'], [' /a,b '], 'present']})
check('fixture 2', solve('/requests/' + str(N) + '/1', [('location', '/a b')]), {'request': '/requests/' + str(N) + '/1', 'decision': [['/a b'], False, ['/a b'], ['/a b'], 'present']})
check('fixture 3', solve('/requests/' + str(N) + '/2', [('LOCATION', '')]), {'request': '/requests/' + str(N) + '/2', 'decision': [[''], False, [''], [''], 'present']})
check('fixture 4', solve('/requests/' + str(N) + '/3', [('X', 'z')]), {'request': '/requests/' + str(N) + '/3', 'decision': [[], False, [], [], 'missing']})
check('fixture 5', solve('/requests/' + str(N) + '/4', [('Location', '/a'), ('location', '/b')]), {'request': '/requests/' + str(N) + '/4', 'decision': [['/a', '/b'], True, ['/a', '/b'], ['/a', '/b'], 'present']})
check('fixture 6', solve('/requests/' + str(N) + '/5', []), {'request': '/requests/' + str(N) + '/5', 'decision': [[], False, [], [], 'missing']})
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 |
|---|---|---|---|
| fixture 1 | {'decision': [[], False, ['/a,b'], [' /a,b '], 'present'], 'request': '/requests/1/0'} | {'decision': [[' /a,b '], False, ['/a,b'], [' /a,b '], 'present'], 'request': '/requests/1/0'} | Failed |
| fixture 2 | {'decision': [['/a b'], False, ['/a b'], ['/a b'], 'present'], 'request': '/requests/1/1'} | {'decision': [['/a b'], False, ['/a b'], ['/a b'], 'present'], 'request': '/requests/1/1'} | Passed |
| fixture 3 | {'decision': [[], False, [''], [''], 'present'], 'request': '/requests/1/2'} | {'decision': [[''], False, [''], [''], 'present'], 'request': '/requests/1/2'} | Failed |
| fixture 4 | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/3'} | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/3'} | Passed |
| fixture 5 | {'decision': [['/b'], True, ['/a', '/b'], ['/a', '/b'], 'present'], 'request': '/requests/1/4'} | {'decision': [['/a', '/b'], True, ['/a', '/b'], ['/a', '/b'], 'present'], 'request': '/requests/1/4'} | Failed |
| fixture 6 | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/5'} | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/5'} | Passed |
SHA-256 / a3f2a5d023f0c90b212c56c6fc7968d3558ff28a50584eef3fff25bee916224a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, lines):
return {'request': request, 'decision': [[v for k,v in lines if k.lower() == 'location'], len([v for k,v in lines if k.lower() == 'location']) > 1, [v.strip(' \t') for k,v in lines if k.lower() == 'location'], [v for k,v in lines if k.lower() == 'location'], 'missing' if not any(k.lower() == 'location' for k,v in lines) else 'present']}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', [('Location', ' /a,b '), ('X', 'z')]), {'request': '/requests/' + str(N) + '/0', 'decision': [[' /a,b '], False, ['/a,b'], [' /a,b '], 'present']})
check('fixture 2', solve('/requests/' + str(N) + '/1', [('location', '/a b')]), {'request': '/requests/' + str(N) + '/1', 'decision': [['/a b'], False, ['/a b'], ['/a b'], 'present']})
check('fixture 3', solve('/requests/' + str(N) + '/2', [('LOCATION', '')]), {'request': '/requests/' + str(N) + '/2', 'decision': [[''], False, [''], [''], 'present']})
check('fixture 4', solve('/requests/' + str(N) + '/3', [('X', 'z')]), {'request': '/requests/' + str(N) + '/3', 'decision': [[], False, [], [], 'missing']})
check('fixture 5', solve('/requests/' + str(N) + '/4', [('Location', '/a'), ('location', '/b')]), {'request': '/requests/' + str(N) + '/4', 'decision': [['/a', '/b'], True, ['/a', '/b'], ['/a', '/b'], 'present']})
check('fixture 6', solve('/requests/' + str(N) + '/5', []), {'request': '/requests/' + str(N) + '/5', 'decision': [[], False, [], [], 'missing']})
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 |
|---|---|---|---|
| fixture 1 | {'decision': [[' /a,b '], False, ['/a,b'], [' /a,b '], 'present'], 'request': '/requests/1/0'} | {'decision': [[' /a,b '], False, ['/a,b'], [' /a,b '], 'present'], 'request': '/requests/1/0'} | Passed |
| fixture 2 | {'decision': [['/a b'], False, ['/a b'], ['/a b'], 'present'], 'request': '/requests/1/1'} | {'decision': [['/a b'], False, ['/a b'], ['/a b'], 'present'], 'request': '/requests/1/1'} | Passed |
| fixture 3 | {'decision': [[''], False, [''], [''], 'present'], 'request': '/requests/1/2'} | {'decision': [[''], False, [''], [''], 'present'], 'request': '/requests/1/2'} | Passed |
| fixture 4 | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/3'} | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/3'} | Passed |
| fixture 5 | {'decision': [['/a', '/b'], True, ['/a', '/b'], ['/a', '/b'], 'present'], 'request': '/requests/1/4'} | {'decision': [['/a', '/b'], True, ['/a', '/b'], ['/a', '/b'], 'present'], 'request': '/requests/1/4'} | Passed |
| fixture 6 | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/5'} | {'decision': [[], False, [], [], 'missing'], 'request': '/requests/1/5'} | Passed |
SHA-256 / 1eaeb7ff007000e5aeef3a6be05b0b42cc1dd54fd647a89b3d9aeb368a85668e
Verification & scope
Stipulated offline redirect policy, not a complete HTTP, browser, URL, cache, or security implementation. Numbered variants vary request correlation identity. 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:28.668543+00:00.
Case digest / f620bbdc9bc49ce3c7422a223c4796f07ea1ac228e24f8767dea1a00a69965b1