open-standards/wai/http-conformance/falsify/gap-withdraws.patch

15 lines
903 B
Diff

# must fail: live_gap_withdraws_a_segment
# a gap at a sequence number bound to an object accepted (hls::Bindings::bind)
diff --git a/wai/wai-rs/src/http_binding/hls.rs b/wai/wai-rs/src/http_binding/hls.rs
index 1852df35..e38575cd 100644
--- a/wai/wai-rs/src/http_binding/hls.rs
+++ b/wai/wai-rs/src/http_binding/hls.rs
@@ -982,7 +982,7 @@ impl Bindings {
for (i, s) in p.segments.iter().enumerate() {
let n = p.media_sequence.checked_add(i as u64).ok_or_else(|| malformed("the media sequence number passes 2^64"))?;
if s.extra.gap {
- if let Some((held, _)) = next.sequences.get(&n) {
+ if let Some((held, _)) = next.sequences.get(&n).filter(|_| false) {
return Err(PlaylistError::Rebound(format!("media sequence {n} was listed with {}, and is now a gap", hex(held))));
}
continue;