mirror of
https://git.asonix.dog/asonix/http-signature-normalization.git
synced 2024-11-25 02:41:00 +00:00
Clippy
This commit is contained in:
parent
efc55fd9a1
commit
92a6f53dd6
2 changed files with 9 additions and 11 deletions
|
@ -504,7 +504,7 @@ impl Config {
|
|||
|
||||
let unsigned = self
|
||||
.config
|
||||
.begin_sign(&method.to_string(), &path_and_query, headers)?;
|
||||
.begin_sign(method.as_ref(), &path_and_query, headers)?;
|
||||
|
||||
Ok(self::create::Unsigned { unsigned })
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ impl Config {
|
|||
|
||||
let unverified = self
|
||||
.config
|
||||
.begin_verify(&method.to_string(), &path_and_query, headers)?;
|
||||
.begin_verify(method.as_ref(), &path_and_query, headers)?;
|
||||
|
||||
Ok(unverified)
|
||||
}
|
||||
|
|
|
@ -67,8 +67,7 @@ where
|
|||
E: From<JoinError> + From<PrepareSignError> + std::fmt::Debug + Send + 'static,
|
||||
K: Display,
|
||||
{
|
||||
if config.set_date {
|
||||
if !request.headers().contains_key("date") {
|
||||
if config.set_date && !request.headers().contains_key("date") {
|
||||
request.headers_mut().insert(
|
||||
actix_http::header::DATE,
|
||||
HttpDate::from(SystemTime::now())
|
||||
|
@ -76,7 +75,6 @@ where
|
|||
.expect("Date is valid"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
let mut headers = request.headers().clone();
|
||||
if config.set_host {
|
||||
|
|
Loading…
Reference in a new issue