Don't encode too early

merge-requests/30/head
Bob Mottram 2021-01-21 17:44:04 +00:00
parent 4ed2cd706a
commit 27b8284491
1 changed files with 4 additions and 3 deletions

View File

@ -9093,14 +9093,15 @@ class PubServer(BaseHTTPRequestHandler):
'show profile posts') 'show profile posts')
else: else:
if self._fetchAuthenticated(): if self._fetchAuthenticated():
msg = json.dumps(actorJson, msgStr = json.dumps(actorJson,
ensure_ascii=False).encode('utf-8') ensure_ascii=False)
msg = msgStr.encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers_with_sig('application/json', msglen, self._set_headers_with_sig('application/json', msglen,
baseDir, path, baseDir, path,
domain, domainFull, port, domain, domainFull, port,
httpPrefix, httpPrefix,
callingDomain, debug, msg) callingDomain, debug, msgStr)
if atPath: if atPath:
print('@ detected outgoing actor: ' + str(actorJson)) print('@ detected outgoing actor: ' + str(actorJson))
print('@ detected outgoing headers: ' + print('@ detected outgoing headers: ' +