You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(negotiation): honor Accept exclusions and specificity before selecting a representation #10
Accept::getBestMatch sorts client ranges by q and returns the first matching server type. This selects explicitly unacceptable representations and lets a wildcard override a more specific range. The documented claim of proper HTTP negotiation does not match RFC 9110 sections 12.4.2 and 12.5.1.
Evidence
Audited commit: a429fbe9a7efce6cee50b82e4a981ea7e3b47a5f. Selection loop, parsing/sort. Normative HTTP semantics: determine each representation's quality using its most specific matching media range; q=0 means not acceptable.
Regression cases
Run these with mb_trim available (the separate PHP compatibility issue #9 must not mask the negotiation behavior):
Compute effective q per candidate from the most specific applicable range; exclude q=0 before ranking candidates.
Match media types and parameter names case-insensitively.
Add tests for these cases, including wildcard exclusions, not only equal-q positive examples.
Keep unsupported-type behavior returning null.
Priority P2; high confidence from branch tracing and RFC. Static validation only: no PHP executable available. Existing AcceptTest lacks these cases; all pre-existing issues/PRs were checked (#1–#8), and #9 is a separate runtime compatibility issue. No source or release changes made.
Validation update: a user-local official Debian PHP 8.4.26 CLI with mbstring became available. Executed the issue's focused cases directly against the pinned source files, without source changes or network requests. All listed current results reproduced exactly. This confirms the behavioral finding dynamically; the full PHPUnit suite has not been run.
Activity
coisa commentedon Oct 21, 2026
Validation update: a user-local official Debian PHP 8.4.26 CLI with mbstring became available. Executed the issue's focused cases directly against the pinned source files, without source changes or network requests. All listed current results reproduced exactly. This confirms the behavioral finding dynamically; the full PHPUnit suite has not been run.