]> Untitled Git - lemmy.git/commitdiff
Respond with `Content-Type: application/activity+json` (#3353)
authorperillamint <perillamint@users.noreply.github.com>
Mon, 26 Jun 2023 10:10:04 +0000 (19:10 +0900)
committerGitHub <noreply@github.com>
Mon, 26 Jun 2023 10:10:04 +0000 (12:10 +0200)
As per ActivityPub specification, the return type should be
`application/activity+json`, not `application/json`.

crates/apub/src/http/mod.rs

index 0b8c8f153178521f0934946c64d10d7bf148c704..947a56adc707ee7bab74927a733655d8e666ade0 100644 (file)
@@ -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<T: Into<Url>>(id: T) -> LemmyResult<HttpRespon
     HttpResponse::Gone()
       .content_type(FEDERATION_CONTENT_TYPE)
       .status(StatusCode::GONE)
-      .content_type("application/json")
+      .content_type("application/activity+json")
       .body(json),
   )
 }