Extra http header fields

master
Bob Mottram 2019-08-15 18:22:39 +01:00
parent 7815126f65
commit 81d77f9843
1 changed files with 6 additions and 0 deletions

View File

@ -112,6 +112,12 @@ def verifyPostHeaders(httpPrefix: str, publicKeyPem: str, headers: dict, \
if signedHeader == '(request-target)': if signedHeader == '(request-target)':
signedHeaderList.append( signedHeaderList.append(
f'(request-target): {method.lower()} {path}') f'(request-target): {method.lower()} {path}')
elif signedHeader.lower() == 'content-type':
continue
elif signedHeader == 'date':
dateJson=messageBodyJsonStr.encode()
print('*********************date: '+str(dateJson))
#signedHeaderList.append(f'date: SHA-256={dateStr}')
elif signedHeader == 'digest': elif signedHeader == 'digest':
bodyDigest = \ bodyDigest = \
base64.b64encode(SHA256.new(messageBodyJsonStr.encode()).digest()) base64.b64encode(SHA256.new(messageBodyJsonStr.encode()).digest())