FAILURE MAP
← Case archive

FA-6636 / HTTP redirects / Open access

A relative Location resolves against the current request URL · case 01

A relative Location resolves against the current request URL.

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

ROOT CAUSE

The faulty implementation uses `location` for the relative-location decision.

THE FAILURE

The faulty implementation uses `location` for the relative-location decision.

Unsuccessful approach: The attempted repair uses `base.rstrip('/') + '/' + location.lstrip('/')` and still violates a separate fixture.

Case contract

A relative Location resolves against the current request URL: return the result specified by the explicit input/output boundary fixtures.

Why this case matters

This deterministic http redirects model isolates the relative-location policy at a network component boundary.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(base, location):
    return location
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://h/a/b', '../c'), 'https://h/c')", "check('fixture 2', solve('https://h/a/b', '/c'), 'https://h/c')", "check('fixture 3', solve('https://h/a', 'https://z/x'), 'https://z/x')", "check('fixture 4', solve('https://h/a', '?q=1'), 'https://h/a?q=1')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 2/chttps://h/cFailed
fixture 3https://z/xhttps://z/xPassed
fixture 4?q=1https://h/a?q=1Failed
fixture 1../chttps://h/cFailed

SHA-256 / 32aa69cd7acb96557ae55f17cfd6f70a6f8fb3b18d6c4fdb633c2751344ee4d2

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(base, location):
    return base.rstrip('/') + '/' + location.lstrip('/')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://h/a/b', '../c'), 'https://h/c')", "check('fixture 2', solve('https://h/a/b', '/c'), 'https://h/c')", "check('fixture 3', solve('https://h/a', 'https://z/x'), 'https://z/x')", "check('fixture 4', solve('https://h/a', '?q=1'), 'https://h/a?q=1')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 2https://h/a/b/chttps://h/cFailed
fixture 3https://h/a/https://z/xhttps://z/xFailed
fixture 4https://h/a/?q=1https://h/a?q=1Failed
fixture 1https://h/a/b/../chttps://h/cFailed

SHA-256 / 58b12b069815d8301abd561b3f6c0292a1fb29ab9bc2d01ac53aaed17d9aedc2

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 4 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

Bounded deterministic policy model over validated inputs; not a complete protocol stack or an interoperability claim. The five variants rotate the same explicit fixture set. 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:38:03.801520+00:00.

Case digest / ebbcd5ea609b8e8b6d4e16837ce4930f39709ed5a35cd92905c86345342cce57