mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
a3328b33bb
commit
d04d047b64
22
httpsig.py
22
httpsig.py
|
@ -338,19 +338,17 @@ def verifyPostHeaders(httpPrefix: str, publicKeyPem: str, headers: dict,
|
||||||
if headers.get(signedHeader):
|
if headers.get(signedHeader):
|
||||||
appendStr = f'content-length: {headers[signedHeader]}'
|
appendStr = f'content-length: {headers[signedHeader]}'
|
||||||
signedHeaderList.append(appendStr)
|
signedHeaderList.append(appendStr)
|
||||||
|
elif headers.get('Content-Length'):
|
||||||
|
contentLength = headers['Content-Length']
|
||||||
|
signedHeaderList.append(f'content-length: {contentLength}')
|
||||||
|
elif headers.get('Content-length'):
|
||||||
|
contentLength = headers['Content-length']
|
||||||
|
appendStr = f'content-length: {contentLength}'
|
||||||
|
signedHeaderList.append(appendStr)
|
||||||
else:
|
else:
|
||||||
if headers.get('Content-Length'):
|
if debug:
|
||||||
contentLength = headers['Content-Length']
|
print('DEBUG: verifyPostHeaders ' + signedHeader +
|
||||||
signedHeaderList.append(f'content-length: {contentLength}')
|
' not found in ' + str(headers))
|
||||||
else:
|
|
||||||
if headers.get('Content-length'):
|
|
||||||
contentLength = headers['Content-length']
|
|
||||||
appendStr = f'content-length: {contentLength}'
|
|
||||||
signedHeaderList.append(appendStr)
|
|
||||||
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' and not noRecencyCheck:
|
if signedHeader == 'date' and not noRecencyCheck:
|
||||||
|
|
Loading…
Reference in New Issue