Variations on the theme

main
Bob Mottram 2019-11-12 19:32:23 +00:00
parent a093472bee
commit cd90434ce3
1 changed files with 10 additions and 8 deletions

View File

@ -193,11 +193,13 @@ def verifyPostHeaders(httpPrefix: str,publicKeyPem: str,headers: dict, \
if headers.get(signedHeader):
signedHeaderList.append(f'content-length: {headers[signedHeader]}')
else:
if debug:
print('DEBUG: verifyPostHeaders '+signedHeader+' not found in '+str(headers))
elif signedHeader == 'Content-Length':
if headers.get(signedHeader):
signedHeaderList.append(f'Content-Length: {headers[signedHeader]}')
if headers.get('Content-Length'):
contentLength=headers['Content-Length']
signedHeaderList.append(f'content-length: {contentLength}')
else:
if headers.get('Content-length'):
contentLength=headers['Content-length']
signedHeaderList.append(f'content-length: {contentLength}')
else:
if debug:
print('DEBUG: verifyPostHeaders '+signedHeader+' not found in '+str(headers))