From: perillamint Date: Mon, 26 Jun 2023 10:10:04 +0000 (+0900) Subject: Respond with `Content-Type: application/activity+json` (#3353) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/%7Biframely.thumbnail_url%7D?a=commitdiff_plain;h=3d7d6b253086f1ac78e6dd459bc4c904df45dbfa;p=lemmy.git Respond with `Content-Type: application/activity+json` (#3353) As per ActivityPub specification, the return type should be `application/activity+json`, not `application/json`. --- diff --git a/crates/apub/src/http/mod.rs b/crates/apub/src/http/mod.rs index 0b8c8f15..947a56ad 100644 --- a/crates/apub/src/http/mod.rs +++ b/crates/apub/src/http/mod.rs @@ -48,7 +48,7 @@ where Ok( HttpResponse::Ok() .content_type(FEDERATION_CONTENT_TYPE) - .content_type("application/json") + .content_type("application/activity+json") .body(json), ) } @@ -61,7 +61,7 @@ fn create_apub_tombstone_response>(id: T) -> LemmyResult