FA-6911 / Content negotiation / Open access
Vary header union is case insensitive and stable · case 01
Vary header union is case insensitive and stable.
ROOT CAUSE
The faulty implementation uses `old+new` for the vary-header-union-is-case-insensitive-and-stable decision.
VERIFIED REPAIR
Apply the explicit vary-header-union-is-case-insensitive-and-stable contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `sorted(set(old+new))` and still violates a separate fixture.
Case contract
Bounded offline decision model: vary header union is case insensitive and stable. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.
Why this case matters
This deterministic content negotiation model isolates the vary-header-union-is-case-insensitive-and-stable 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(old, new):
return old+new
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['Accept'], ['accept', 'Encoding']), ['accept', 'encoding'])", "check('fixture 2', solve([], []), [])", "check('fixture 3', solve(['z'], ['a']), ['z', 'a'])", "check('fixture 4', solve(['A'], []), ['a'])"]
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 | ['z', 'a'] | ['z', 'a'] | Passed |
| fixture 4 | ['A'] | ['a'] | Failed |
| fixture 1 | ['Accept', 'accept', 'Encoding'] | ['accept', 'encoding'] | Failed |
SHA-256 / 0103758b3773ea1b2369dc282fee147b1ccf97bb47c190a01b03bfd5b556f480
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(old, new):
return sorted(set(old+new))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['Accept'], ['accept', 'Encoding']), ['accept', 'encoding'])", "check('fixture 2', solve([], []), [])", "check('fixture 3', solve(['z'], ['a']), ['z', 'a'])", "check('fixture 4', solve(['A'], []), ['a'])"]
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', 'z'] | ['z', 'a'] | Failed |
| fixture 4 | ['A'] | ['a'] | Failed |
| fixture 1 | ['Accept', 'Encoding', 'accept'] | ['accept', 'encoding'] | Failed |
SHA-256 / 0a1b54c39f68c6ed0602d251c7288c472dab6571d6ba6c1b344afb6a47d18329
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(old, new):
return list(dict.fromkeys(x.lower() for x in old+new))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['Accept'], ['accept', 'Encoding']), ['accept', 'encoding'])", "check('fixture 2', solve([], []), [])", "check('fixture 3', solve(['z'], ['a']), ['z', 'a'])", "check('fixture 4', solve(['A'], []), ['a'])"]
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 | ['z', 'a'] | ['z', 'a'] | Passed |
| fixture 4 | ['a'] | ['a'] | Passed |
| fixture 1 | ['accept', 'encoding'] | ['accept', 'encoding'] | Passed |
SHA-256 / c09160cc9c8e51e47095219cf1b2cd48908017eae7ec47cfafe412a734d2e2ea
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:06.441251+00:00.
Case digest / 65aa5b45b4d51290ff9bef2ee166a6442b63d72ed0709fd17dca2cd2aa3bf740