From 8b3a638d82261756887f06f2b325677b69c28a5c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 1 Sep 2021 20:12:48 +0100 Subject: [PATCH] Content type --- httpsig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/httpsig.py b/httpsig.py index 5189b5713..96fc2d338 100644 --- a/httpsig.py +++ b/httpsig.py @@ -195,11 +195,11 @@ def createSignedHeader(privateKeyPem: str, nickname: str, messageBodyJsonStr: str) -> {}: """Note that the domain is the destination, not the sender """ - contentType = 'application/activity+json' headerDomain = getFullDomain(toDomain, toPort) dateStr = strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime()) if not withDigest: + contentType = 'application/activity+json, application/ld+json' headers = { '(request-target)': f'get {path}', 'host': headerDomain, @@ -211,6 +211,7 @@ def createSignedHeader(privateKeyPem: str, nickname: str, domain, port, toDomain, toPort, path, httpPrefix, None) else: + contentType = 'application/activity+json' bodyDigest = messageContentDigest(messageBodyJsonStr) contentLength = len(messageBodyJsonStr) headers = {