# must fail: object_length_trailing # bytes after the envelope are accepted (head::parse_head) diff --git a/wai/wai-rs/src/http_binding/head.rs b/wai/wai-rs/src/http_binding/head.rs index 1470133d..b861cb16 100644 --- a/wai/wai-rs/src/http_binding/head.rs +++ b/wai/wai-rs/src/http_binding/head.rs @@ -101,7 +101,7 @@ pub fn parse_head(prefix: &[u8], envelope_len: u64) -> Result(); - if total != envelope_len { + if total > envelope_len { return Err(RangeRefusal::ObjectLengthMismatch { expected: total, got: envelope_len }); } let bytes = prefix[..head_len as usize].to_vec();