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,14 +193,16 @@ def verifyPostHeaders(httpPrefix: str,publicKeyPem: str,headers: dict, \
if headers.get(signedHeader): if headers.get(signedHeader):
signedHeaderList.append(f'content-length: {headers[signedHeader]}') signedHeaderList.append(f'content-length: {headers[signedHeader]}')
else: else:
if debug: if headers.get('Content-Length'):
print('DEBUG: verifyPostHeaders '+signedHeader+' not found in '+str(headers)) contentLength=headers['Content-Length']
elif signedHeader == 'Content-Length': signedHeaderList.append(f'content-length: {contentLength}')
if headers.get(signedHeader): else:
signedHeaderList.append(f'Content-Length: {headers[signedHeader]}') if headers.get('Content-length'):
else: contentLength=headers['Content-length']
if debug: signedHeaderList.append(f'content-length: {contentLength}')
print('DEBUG: verifyPostHeaders '+signedHeader+' not found in '+str(headers)) else:
if debug:
print('DEBUG: verifyPostHeaders '+signedHeader+' not found in '+str(headers))
else: else:
if headers.get(signedHeader): if headers.get(signedHeader):
if signedHeader=='date': if signedHeader=='date':