From 08c7177db5ef57b5cdb6be9ac756fe565c91f63b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Nov 2019 19:20:55 +0000 Subject: [PATCH] Return to case --- httpsig.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/httpsig.py b/httpsig.py index 1e65c593..79941e5d 100644 --- a/httpsig.py +++ b/httpsig.py @@ -189,15 +189,11 @@ def verifyPostHeaders(httpPrefix: str,publicKeyPem: str,headers: dict, \ #print('***************************Verify digest: SHA-256='+bodyDigest) #print('***************************Verify messageBodyJsonStr: '+messageBodyJsonStr) elif signedHeader == 'content-length': - contentLengthStr=signedHeader - if not headers.get(contentLengthStr): - if headers.get('Content-Length'): - contentLengthStr='Content-Length' - if headers.get(contentLengthStr): - signedHeaderList.append(f'{contentLengthStr}: {headers[signedHeader]}') + if headers.get(signedHeader): + signedHeaderList.append(f'content-length: {headers[signedHeader]}') else: if debug: - print('DEBUG: verifyPostHeaders '+contentLengthStr+' not found in '+str(headers)) + print('DEBUG: verifyPostHeaders '+signedHeader+' not found in '+str(headers)) elif signedHeader == 'Content-Length': if headers.get(signedHeader): signedHeaderList.append(f'Content-Length: {headers[signedHeader]}')