From 18cbe07f569aa74b0dfcb88a84071478b2479d5f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 31 Aug 2021 22:26:07 +0100 Subject: [PATCH] Change content-type to accept within non-digest http signature --- httpsig.py | 2 +- tests.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/httpsig.py b/httpsig.py index 0f91ac059..ad9b92632 100644 --- a/httpsig.py +++ b/httpsig.py @@ -59,7 +59,7 @@ def signPostHeaders(dateStr: str, privateKeyPem: str, '(request-target)': f'post {path}', 'host': toDomain, 'date': dateStr, - 'content-type': 'application/json' + 'accept': 'application/json' } else: bodyDigest = messageContentDigest(messageBodyJsonStr) diff --git a/tests.py b/tests.py index 969b29f8f..1d0a2b0ff 100644 --- a/tests.py +++ b/tests.py @@ -365,7 +365,7 @@ def _testHttpsigBase(withDigest): headers = { 'host': headersDomain, 'date': dateStr, - 'content-type': 'application/json' + 'accept': 'application/json' } signatureHeader = \ signPostHeaders(dateStr, privateKeyPem, nickname, @@ -5362,6 +5362,7 @@ def _translateOntology() -> None: def runAllTests(): print('Running tests...') + _testHttpsig() updateDefaultThemesList(os.getcwd()) _translateOntology() _testGetPriceFromString()