mirror of https://gitlab.com/bashrc2/epicyon
Include accept within non-digest http signature
parent
ed516c8ff7
commit
a69ac4c883
|
@ -199,7 +199,8 @@ def createSignedHeader(privateKeyPem: str, nickname: str,
|
||||||
headers = {
|
headers = {
|
||||||
'(request-target)': f'post {path}',
|
'(request-target)': f'post {path}',
|
||||||
'host': headerDomain,
|
'host': headerDomain,
|
||||||
'date': dateStr
|
'date': dateStr,
|
||||||
|
'accept': contentType
|
||||||
}
|
}
|
||||||
signatureHeader = \
|
signatureHeader = \
|
||||||
signPostHeaders(dateStr, privateKeyPem, nickname,
|
signPostHeaders(dateStr, privateKeyPem, nickname,
|
||||||
|
|
|
@ -181,7 +181,7 @@ def _getJsonSigned(session, url: str, domainFull: str, sessionHeaders: {},
|
||||||
print('Signed GET url: ' + url)
|
print('Signed GET url: ' + url)
|
||||||
print('Signed GET httpPrefix: ' + httpPrefix)
|
print('Signed GET httpPrefix: ' + httpPrefix)
|
||||||
messageStr = ''
|
messageStr = ''
|
||||||
withDigest = True
|
withDigest = False
|
||||||
signatureHeaderJson = \
|
signatureHeaderJson = \
|
||||||
createSignedHeader(signingPrivateKeyPem, nickname, domain, port,
|
createSignedHeader(signingPrivateKeyPem, nickname, domain, port,
|
||||||
toDomain, toPort, url, httpPrefix, withDigest,
|
toDomain, toPort, url, httpPrefix, withDigest,
|
||||||
|
|
2
tests.py
2
tests.py
|
@ -1457,7 +1457,7 @@ def testSharedItemsFederation():
|
||||||
}
|
}
|
||||||
bobInstanceActorJson = \
|
bobInstanceActorJson = \
|
||||||
getJson(signingPrivateKeyPem, sessionClient,
|
getJson(signingPrivateKeyPem, sessionClient,
|
||||||
'http://' + bobAddress + '/@actor', testHeaders, {}, True,
|
'http://' + bobAddress + '/@actor', testHeaders, {}, True,
|
||||||
__version__, 'http', 'somedomain.or.other', 10, True)
|
__version__, 'http', 'somedomain.or.other', 10, True)
|
||||||
assert bobInstanceActorJson
|
assert bobInstanceActorJson
|
||||||
pprint(bobInstanceActorJson)
|
pprint(bobInstanceActorJson)
|
||||||
|
|
Loading…
Reference in New Issue