hyperium / headers

Typed HTTP Headers from hyper
https://hyper.rs
MIT License
162 stars 84 forks source link

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

Open paolobarbolini opened 11 months ago

paolobarbolini commented 11 months ago

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();
}