mirror of https://gitlab.com/bashrc2/epicyon
Content type
parent
a751dbdf14
commit
8b3a638d82
|
@ -195,11 +195,11 @@ def createSignedHeader(privateKeyPem: str, nickname: str,
|
||||||
messageBodyJsonStr: str) -> {}:
|
messageBodyJsonStr: str) -> {}:
|
||||||
"""Note that the domain is the destination, not the sender
|
"""Note that the domain is the destination, not the sender
|
||||||
"""
|
"""
|
||||||
contentType = 'application/activity+json'
|
|
||||||
headerDomain = getFullDomain(toDomain, toPort)
|
headerDomain = getFullDomain(toDomain, toPort)
|
||||||
|
|
||||||
dateStr = strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime())
|
dateStr = strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime())
|
||||||
if not withDigest:
|
if not withDigest:
|
||||||
|
contentType = 'application/activity+json, application/ld+json'
|
||||||
headers = {
|
headers = {
|
||||||
'(request-target)': f'get {path}',
|
'(request-target)': f'get {path}',
|
||||||
'host': headerDomain,
|
'host': headerDomain,
|
||||||
|
@ -211,6 +211,7 @@ def createSignedHeader(privateKeyPem: str, nickname: str,
|
||||||
domain, port, toDomain, toPort,
|
domain, port, toDomain, toPort,
|
||||||
path, httpPrefix, None)
|
path, httpPrefix, None)
|
||||||
else:
|
else:
|
||||||
|
contentType = 'application/activity+json'
|
||||||
bodyDigest = messageContentDigest(messageBodyJsonStr)
|
bodyDigest = messageContentDigest(messageBodyJsonStr)
|
||||||
contentLength = len(messageBodyJsonStr)
|
contentLength = len(messageBodyJsonStr)
|
||||||
headers = {
|
headers = {
|
||||||
|
|
Loading…
Reference in New Issue