FAILURE MAP
← Case archive

FA-27856 / HTTP redirects / Open access

Select an unambiguous Location field without losing raw syntax: comma is target data · case 01

A URI comma is treated as a header list separator.

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

ROOT CAUSE

The comma-is-target-data decision uses "[v.split(',')[0] for k,v in lines if k.lower() == '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.split(',')[-1] for k,v in lines if k.lower() == '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.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.split(',')[0] 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 fixtureActualExpectedOutcome
fixture 1{'decision': [[' /a,b '], False, ['/a,b'], [' /a'], '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'}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 / 8c7dd3a6b01bff96af4102271bba02d63c16db10760697c8013b82111fd9d74f

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.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.split(',')[-1] 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 fixtureActualExpectedOutcome
fixture 1{'decision': [[' /a,b '], False, ['/a,b'], ['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'}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 / 9d99ed3f956f648b8c96e9f0ca0e128a8787432632c0820beeb84211e1f7be16

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

Case digest / bb5427cbf2af63ea85592c65d58f12e7c4e43fa45fe017a5b0f79e42ef828e6d