FA-7041 / Proxy forwarding / Open access
Origin form forwarding retains path and query · case 01
Origin form forwarding retains path and query.
ROOT CAUSE
The faulty implementation uses `urlsplit(url).path` for the origin-form-forwarding-retains-path-and-query decision.
VERIFIED REPAIR
Apply the explicit origin-form-forwarding-retains-path-and-query contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `urlsplit(url).path or "/"` and still violates a separate fixture.
Case contract
Bounded offline decision model: origin form forwarding retains path and query. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.
Why this case matters
This deterministic proxy forwarding model isolates the origin-form-forwarding-retains-path-and-query 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(url):
return urlsplit(url).path
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://h/a?q=1'), '/a?q=1')", "check('fixture 2', solve('https://h'), '/')", "check('fixture 3', solve('https://h/a#f'), '/a')", "check('fixture 4', solve('https://h/?q=x'), '/?q=x')"]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | | / | Failed |
| fixture 3 | /a | /a | Passed |
| fixture 4 | / | /?q=x | Failed |
| fixture 1 | /a | /a?q=1 | Failed |
SHA-256 / 9b4627dc6431627819b1ee4e32ddb5fb19895cfd6660fd3e55c4491b366599e7
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(url):
return urlsplit(url).path or "/"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://h/a?q=1'), '/a?q=1')", "check('fixture 2', solve('https://h'), '/')", "check('fixture 3', solve('https://h/a#f'), '/a')", "check('fixture 4', solve('https://h/?q=x'), '/?q=x')"]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | / | / | Passed |
| fixture 3 | /a | /a | Passed |
| fixture 4 | / | /?q=x | Failed |
| fixture 1 | /a | /a?q=1 | Failed |
SHA-256 / 5de1254366a77f30534f9a51ec345d4d1291140cbd3fe3bd77d4449a518698d6
3 / The verified repair
Exit 0"""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(url):
return (urlsplit(url).path or "/") + ("?"+urlsplit(url).query if urlsplit(url).query else "")
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://h/a?q=1'), '/a?q=1')", "check('fixture 2', solve('https://h'), '/')", "check('fixture 3', solve('https://h/a#f'), '/a')", "check('fixture 4', solve('https://h/?q=x'), '/?q=x')"]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | / | / | Passed |
| fixture 3 | /a | /a | Passed |
| fixture 4 | /?q=x | /?q=x | Passed |
| fixture 1 | /a?q=1 | /a?q=1 | Passed |
SHA-256 / 5e75e301ced390282e035e3b68efa45b5a9f57f8830ef420769c42b1fd9b88f8
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:07.806964+00:00.
Case digest / 479d268bcc8dfd6c2ac5490ae7a834d8e99da9cf1175ae4249ab0a066f1d9e7b