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): 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'):
contentLength=headers['Content-length']
signedHeaderList.append(f'content-length: {contentLength}')
else: else:
if debug: if debug:
print('DEBUG: verifyPostHeaders '+signedHeader+' not found in '+str(headers)) print('DEBUG: verifyPostHeaders '+signedHeader+' not found in '+str(headers))