diff --git a/http-signature-normalization-reqwest/src/lib.rs b/http-signature-normalization-reqwest/src/lib.rs index 382ce08..fb892c3 100644 --- a/http-signature-normalization-reqwest/src/lib.rs +++ b/http-signature-normalization-reqwest/src/lib.rs @@ -206,16 +206,14 @@ where E: From, K: Display, { - if config.set_date { - if !req.headers().contains_key("date") { - req.headers_mut().insert( - "date", - HttpDate::from(SystemTime::now()) - .to_string() - .try_into() - .map_err(SignError::from)?, - ); - } + if config.set_date && !req.headers().contains_key("date") { + req.headers_mut().insert( + "date", + HttpDate::from(SystemTime::now()) + .to_string() + .try_into() + .map_err(SignError::from)?, + ); } let mut bt = std::collections::BTreeMap::new(); for (k, v) in req.headers().iter() {