mirror of https://gitlab.com/bashrc2/epicyon
Strip header
parent
b0e099fc7f
commit
6e03698235
|
@ -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,
|
||||
|
|
2
tests.py
2
tests.py
|
@ -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' + \
|
||||
|
|
Loading…
Reference in New Issue