open-standards/wai/http-conformance/falsify/record-alt.patch
Transaction Science 909312ce15 wai: falsification patches for the fix round, and the four the rewrite moved, regenerated
New: threshold-all, refusal-ends, reuse-stale, plus-sign, dispatch-layer,
union-no-layer, wai-prefix-case, dup-caps, record-alt, base-unanswered, each
naming the corpus cases it must fail. accept-gzip, trust-content-range,
skip-on-absent and intersection are the same defects written against the
current code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 09:35:08 -04:00

15 lines
902 B
Diff

# must fail: union_OF_record_fallback
# a WAI1 lists a capability SPEC §4 never dispatches (codecs::element_of)
diff --git a/wai/wai-rs/src/http_binding/codecs.rs b/wai/wai-rs/src/http_binding/codecs.rs
index 530ae822..ff531eb8 100644
--- a/wai/wai-rs/src/http_binding/codecs.rs
+++ b/wai/wai-rs/src/http_binding/codecs.rs
@@ -241,7 +241,7 @@ pub fn element_of(head: &Head) -> Result<Element, CodecsError> {
let m = head.manifest_v1().map_err(bad)?;
let mut alts: Vec<Alt> = Vec::new();
for c in [Some(m.model_requirement.capability.as_str()), m.model_requirement.fallback.as_deref()].into_iter().flatten() {
- if is_dispatchable(c) && !alts.iter().any(|a| a.cap == short(c)) {
+ if !alts.iter().any(|a| a.cap == short(c)) {
alts.push(Alt { cap: short(c), plus: Vec::new() });
}
}