Fix a few mistakes
This commit is contained in:
parent
3c868e1289
commit
b36e83049c
|
@ -90,7 +90,7 @@ pub trait Actor: Sized {
|
||||||
let res = Client::new()
|
let res = Client::new()
|
||||||
.post(&self.compute_inbox(conn)[..])
|
.post(&self.compute_inbox(conn)[..])
|
||||||
.headers(request::headers())
|
.headers(request::headers())
|
||||||
.header(request::signature(sender, request::headers, conn))
|
.header(request::signature(sender, request::headers(), conn))
|
||||||
.header(request::digest(signed.to_string()))
|
.header(request::digest(signed.to_string()))
|
||||||
.body(signed.to_string())
|
.body(signed.to_string())
|
||||||
.send();
|
.send();
|
||||||
|
|
|
@ -25,7 +25,7 @@ pub fn headers() -> Headers {
|
||||||
headers
|
headers
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn signature<S: Signer>(signer: S, headers: Headers, conn: &PgConnection) -> Signature {
|
pub fn signature<S: Signer>(signer: &S, headers: Headers, conn: &PgConnection) -> Signature {
|
||||||
let signed_string = headers.iter().map(|h| format!("{}: {}", h.name().to_lowercase(), h.value_string())).collect::<Vec<String>>().join("\n");
|
let signed_string = headers.iter().map(|h| format!("{}: {}", h.name().to_lowercase(), h.value_string())).collect::<Vec<String>>().join("\n");
|
||||||
let signed_headers = headers.iter().map(|h| h.name().to_string()).collect::<Vec<String>>().join(" ").to_lowercase();
|
let signed_headers = headers.iter().map(|h| h.name().to_string()).collect::<Vec<String>>().join(" ").to_lowercase();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue