From bcc3e55554cd6211cc616332f907884740289301 Mon Sep 17 00:00:00 2001 From: Wesley Aptekar-Cassels Date: Fri, 7 Apr 2023 05:51:00 -0400 Subject: [PATCH] Fix Accept header for requesting ActivityPub objects This is the header described in the ActivityPub spec, which should fix some federation problems with GoToSocial and potentially other picky services. Related: #2794 --- bookwyrm/activitypub/base_activity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/activitypub/base_activity.py b/bookwyrm/activitypub/base_activity.py index 840dab6a43..1443eb118e 100644 --- a/bookwyrm/activitypub/base_activity.py +++ b/bookwyrm/activitypub/base_activity.py @@ -384,7 +384,7 @@ def get_activitypub_data(url): resp = requests.get( url, headers={ - "Accept": "application/json; charset=utf-8", + "Accept": 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', "Date": now, "Signature": make_signature("get", sender, url, now), },