Change HTTP signature date format for compatibility with mastodon
This commit is contained in:
parent
3fde882e1d
commit
e48670c28b
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ pub fn create_http_signature(
|
||||||
.map_err(|_| SignatureError::UrlError)?;
|
.map_err(|_| SignatureError::UrlError)?;
|
||||||
let host = request_url_object.host_str()
|
let host = request_url_object.host_str()
|
||||||
.ok_or(SignatureError::UrlError)?;
|
.ok_or(SignatureError::UrlError)?;
|
||||||
let date = Utc::now().to_rfc2822();
|
let date = Utc::now().format("%a, %d %b %Y %T GMT").to_string();
|
||||||
let digest = get_message_digest(request_body);
|
let digest = get_message_digest(request_body);
|
||||||
let message = format!(
|
let message = format!(
|
||||||
"(request-target): post {}\nhost: {}\ndate: {}\ndigest: {}",
|
"(request-target): post {}\nhost: {}\ndate: {}\ndigest: {}",
|
||||||
|
|
Loading…
Reference in a new issue