cave/activitypub: use the right MIME_TYPE
This commit is contained in:
parent
2f66958a6a
commit
c3c67a54e4
|
@ -21,9 +21,9 @@ where
|
|||
let mut req = http::Request::builder()
|
||||
.uri(uri)
|
||||
.header("host", &host)
|
||||
.header("content-type", "application/activity+json")
|
||||
.header("content-type", super::MIME_TYPE)
|
||||
.header("accept", super::MIME_TYPE)
|
||||
.header("date", httpdate::fmt_http_date(SystemTime::now()))
|
||||
.header("accept", "application/activity+json, application/ld+json")
|
||||
.header("digest", digest_header)
|
||||
.body(vec![])?;
|
||||
SigningConfig::new(RsaSha256, private_key, key_id)
|
||||
|
|
|
@ -7,6 +7,8 @@ pub use error::Error;
|
|||
use std::collections::HashMap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
const MIME_TYPE: &str = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"";
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Actor {
|
||||
#[serde(rename = "@context")]
|
||||
|
|
|
@ -37,7 +37,8 @@ pub async fn send_raw(
|
|||
.method("POST")
|
||||
.uri(uri)
|
||||
.header("host", &host)
|
||||
.header("content-type", "application/activity+json")
|
||||
.header("content-type", super::MIME_TYPE)
|
||||
.header("accept", super::MIME_TYPE)
|
||||
.header("date", httpdate::fmt_http_date(SystemTime::now()))
|
||||
.header("digest", digest_header)
|
||||
.body(body.as_ref().clone())
|
||||
|
|
Loading…
Reference in New Issue