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]>
15 lines
772 B
Diff
15 lines
772 B
Diff
# must fail: codecs_upper_prefix
|
|
# an element beginning WAI is read as classical (codecs::is_wai_element)
|
|
diff --git a/wai/wai-rs/src/http_binding/codecs.rs b/wai/wai-rs/src/http_binding/codecs.rs
|
|
index 530ae822..cdc19410 100644
|
|
--- a/wai/wai-rs/src/http_binding/codecs.rs
|
|
+++ b/wai/wai-rs/src/http_binding/codecs.rs
|
|
@@ -156,7 +156,7 @@ pub fn parse_element(s: &str) -> Result<Element, CodecsError> {
|
|
/// any ASCII case. Such an element that is not a well-formed `wai1.` or `wai2.` element
|
|
/// is malformed, never classical.
|
|
fn is_wai_element(e: &str) -> bool {
|
|
- e.as_bytes().get(..3).is_some_and(|b| b.eq_ignore_ascii_case(b"wai"))
|
|
+ e.as_bytes().get(..3) == Some(&b"wai"[..])
|
|
}
|
|
|
|
/// Parse a `codecs` value: one entry per `,`-separated element, `None` for a
|