mirror of https://gitlab.com/bashrc2/epicyon
Alternative actor formats
parent
4aa692e21d
commit
5c965a57e1
12
daemon.py
12
daemon.py
|
@ -9905,11 +9905,19 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'show profile posts')
|
'show profile posts')
|
||||||
else:
|
else:
|
||||||
if self._fetchAuthenticated():
|
if self._fetchAuthenticated():
|
||||||
|
acceptStr = self.headers['Accept']
|
||||||
msgStr = json.dumps(actorJson, ensure_ascii=False)
|
msgStr = json.dumps(actorJson, ensure_ascii=False)
|
||||||
msg = msgStr.encode('utf-8')
|
msg = msgStr.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('application/ld+json', msglen,
|
if 'application/ld+json' in acceptStr:
|
||||||
cookie, callingDomain)
|
self._set_headers('application/ld+json', msglen,
|
||||||
|
cookie, callingDomain)
|
||||||
|
elif 'application/jrd+json' in acceptStr:
|
||||||
|
self._set_headers('application/jrd+json', msglen,
|
||||||
|
cookie, callingDomain)
|
||||||
|
else:
|
||||||
|
self._set_headers('application/activity+json', msglen,
|
||||||
|
cookie, callingDomain)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
else:
|
else:
|
||||||
self._404()
|
self._404()
|
||||||
|
|
Loading…
Reference in New Issue