Change content-type to accept within non-digest http signature

main
Bob Mottram 2021-08-31 22:26:07 +01:00
parent e8d59a951b
commit 18cbe07f56
2 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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()