Strip header

main
Bob Mottram 2021-04-04 21:41:55 +01:00
parent b0e099fc7f
commit 6e03698235
2 changed files with 1 additions and 3 deletions

View File

@ -180,7 +180,7 @@ def signPostHeadersNew(dateStr: str, privateKeyPem: str,
}
signatureHeader = '; '.join(
[f'{k}=:{v}:' for k, v in signatureDict.items()])
return signatureIndexHeader, signatureHeader
return signatureIndexHeader.strip(), signatureHeader
def createSignedHeader(privateKeyPem: str, nickname: str,

View File

@ -274,8 +274,6 @@ def testHttpSigNew():
if signatureIndexHeader != expectedIndexHeader:
print('Unexpected new http header: ' + signatureIndexHeader)
print('Should be: ' + expectedIndexHeader)
if signatureIndexHeader.strip() != expectedIndexHeader:
print('stripped match')
assert signatureIndexHeader == expectedIndexHeader
assert signatureHeader == \
'sig1=:LQU1PcJILSp1Q30GWINusfftYYKfTtam7InSu2c+ZzfGC' + \