open-standards/wai/http-conformance/falsify/skip-on-absent.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
864 B
Diff

# must fail: plan_no_digest_O4 fetch_O4
# a base component with no sha256 is fetched by range (plan::plan_components)
diff --git a/wai/wai-rs/src/http_binding/plan.rs b/wai/wai-rs/src/http_binding/plan.rs
index 42c4bf47..c5dbc3ed 100644
--- a/wai/wai-rs/src/http_binding/plan.rs
+++ b/wai/wai-rs/src/http_binding/plan.rs
@@ -149,7 +149,7 @@ pub fn plan_components(
let mut plan = Plan { requests: Vec::new(), whole_rest: None, dropped: Vec::new() };
let Some(rest) = rest_of(head) else { return plan };
let has_digest = |i: usize| digests_present.get(i).copied().unwrap_or(false);
- if let Some(&(index, _)) = wanted.iter().find(|&&(i, c)| c == Class::Base && !has_digest(i)) {
+ if let Some(&(index, _)) = wanted.iter().find(|_| false) {
plan.whole_rest = Some((rest, WhyWhole::DigestAbsent { index }));
return plan;
}