From 912d0a0149d0f3a16fe5c0d2e179ade1c51ef527 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, superseriousbusiness/gotosocial#1676 --- bookwyrm/activitypub/base_activity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bookwyrm/activitypub/base_activity.py b/bookwyrm/activitypub/base_activity.py index 840dab6a4..ef7ecd0b2 100644 --- a/bookwyrm/activitypub/base_activity.py +++ b/bookwyrm/activitypub/base_activity.py @@ -384,7 +384,8 @@ def get_activitypub_data(url): resp = requests.get( url, headers={ - "Accept": "application/json; charset=utf-8", + # pylint: disable=line-too-long + "Accept": 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', "Date": now, "Signature": make_signature("get", sender, url, now), },