Follow Rust and crates update

This commit is contained in:
Kitaiti Makoto
2021-11-28 07:53:13 +09:00
parent 9187e4dde9
commit ae3344f318
35 changed files with 208 additions and 160 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ where
};
// Handle the activity
match obj.activity(ctx, actor, &act_id) {
match obj.activity(ctx, actor, act_id) {
Ok(res) => Inbox::Handled(res.into()),
Err(e) => Inbox::Failed(e),
}
+1 -1
View File
@@ -145,7 +145,7 @@ where
warn!("Inbox doesn't have host: {:?}", &inbox);
continue;
};
let host_header_value = HeaderValue::from_str(&url.host_str().expect("Unreachable"));
let host_header_value = HeaderValue::from_str(url.host_str().expect("Unreachable"));
if host_header_value.is_err() {
warn!("Header value is invalid: {:?}", url.host_str());
continue;
+1 -1
View File
@@ -182,7 +182,7 @@ pub fn verify_http_headers<S: Signer + ::std::fmt::Debug>(
}
let digest = all_headers.get_one("digest").unwrap_or("");
let digest = request::Digest::from_header(digest);
if !digest.map(|d| d.verify_header(&data)).unwrap_or(false) {
if !digest.map(|d| d.verify_header(data)).unwrap_or(false) {
// signature was valid, but body content does not match its digest
return SignatureValidity::Invalid;
}