mirror of https://gitlab.com/bashrc2/epicyon
Protocol header for nodeinfo
parent
7dc4a7624e
commit
a3df7759f4
|
@ -1644,14 +1644,11 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg_str)
|
||||
msg = msg_str.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
if self._has_accept(calling_domain):
|
||||
protocol_str = \
|
||||
get_json_content_from_accept(self.headers.get('Accept'))
|
||||
'application/json; profile=' + \
|
||||
'"http://nodeinfo.diaspora.software/ns/schema/2.1#"'
|
||||
self._set_headers(protocol_str, msglen,
|
||||
None, calling_domain, True)
|
||||
else:
|
||||
self._set_headers('application/ld+json', msglen,
|
||||
None, calling_domain, True)
|
||||
self._write(msg)
|
||||
if referer_domain:
|
||||
print('nodeinfo sent to ' + referer_domain)
|
||||
|
|
Loading…
Reference in New Issue