From 8ba875af4a4b936e9b2d513489918df6ef3aa28d Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 26 Oct 2021 14:37:43 -0700 Subject: [PATCH] Improve federation compability with Hubzilla and Zap Co-authored-by: hubzilla Fixes #1564 --- bookwyrm/connectors/abstract_connector.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bookwyrm/connectors/abstract_connector.py b/bookwyrm/connectors/abstract_connector.py index c032986d..79d79be4 100644 --- a/bookwyrm/connectors/abstract_connector.py +++ b/bookwyrm/connectors/abstract_connector.py @@ -227,8 +227,12 @@ def get_data(url, params=None, timeout=10): resp = requests.get( url, params=params, - headers={ - "Accept": "application/json; charset=utf-8", + headers={ # pylint: disable=line-too-long + "Accept": ( + "application/activity+json," + ' application/ld+json; profile="https://www.w3.org/ns/activitystreams",' + " application/json; charset=utf-8" + ), "User-Agent": settings.USER_AGENT, }, timeout=timeout,