mirror of https://gitlab.com/bashrc2/epicyon
Convert json to string
parent
437f07f95a
commit
4ab26f0378
|
@ -334,8 +334,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
print('DEBUG: WEBFINGER nodeinfo')
|
||||
info=metaDataNodeInfo(self.server.registration,self.server.projectVersion)
|
||||
if info:
|
||||
msg=info.encode('utf-8')
|
||||
self._set_headers('application/ld+json',len(msg),None)
|
||||
msg=json.dumps(info).encode('utf-8')
|
||||
self._set_headers('application/json',len(msg),None)
|
||||
self._write(msg)
|
||||
return True
|
||||
|
||||
|
@ -357,7 +357,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if self.path.startswith('/.well-known/nodeinfo'):
|
||||
wfResult=webfingerNodeInfo(self.server.httpPrefix,self.server.domainFull)
|
||||
if wfResult:
|
||||
msg=wfResult.encode('utf-8')
|
||||
msg=json.dumps(wfResult).encode('utf-8')
|
||||
self._set_headers('application/json',len(msg),None)
|
||||
self._write(msg)
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue