headers icon indicating copy to clipboard operation
headers copied to clipboard

`IfMatch` of empty string doesn't get rejected as expected

Open paolobarbolini opened this issue 2 years ago • 0 comments

I wouldn't expect this to pass. It doesn't for ETag but it seems to work for IfMatch for some reason

use headers::Header as _;

fn main() {
    let _ = headers::IfMatch::decode(&mut [&headers::HeaderValue::from_static("")].into_iter())
        .unwrap();
    let _ = headers::IfMatch::decode(&mut [].into_iter()).unwrap();
}

paolobarbolini avatar Sep 13 '23 20:09 paolobarbolini