From 7df4fa173bd66b0644e1b697c26ec40a77cc9334 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 8 Sep 2021 13:19:01 +0100 Subject: [PATCH] Accept jrd --- httpsig.py | 4 +++- tests.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/httpsig.py b/httpsig.py index cd3819ef8..1b08cfa0c 100644 --- a/httpsig.py +++ b/httpsig.py @@ -209,7 +209,9 @@ def createSignedHeader(privateKeyPem: str, nickname: str, dateStr = strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime()) if not withDigest: - contentType = 'application/activity+json, application/ld+json' + contentType = \ + 'application/activity+json, ' + \ + 'application/ld+json, application/jrd+json' headers = { '(request-target)': f'get {path}', 'host': headerDomain, diff --git a/tests.py b/tests.py index 672b4b12d..d4b379ef1 100644 --- a/tests.py +++ b/tests.py @@ -170,7 +170,8 @@ def _testHttpSignedGET(): user_agent = "http.rb/4.4.1 (Mastodon/3.4.1; +https://octodon.social/)" dateStr = 'Wed, 01 Sep 2021 16:11:10 GMT' accept_encoding = 'gzip' - accept = 'application/activity+json, application/ld+json' + accept = \ + 'application/activity+json, application/ld+json, application/jrd+json' signature = \ 'keyId="https://octodon.social/actor#main-key",' + \ 'algorithm="rsa-sha256",' + \