Send ontology file

main
Bob Mottram 2021-09-12 11:59:07 +01:00
parent 3220049934
commit f62ff5e748
1 changed files with 4 additions and 0 deletions

View File

@ -6493,9 +6493,13 @@ class PubServer(BaseHTTPRequestHandler):
with open(ontologyFilename, 'r') as fp:
ontologyFile = fp.read()
if ontologyFile:
ontologyFile = \
ontologyFile.replace('static.datafoodconsortium.org',
self.server.domainFull)
msg = ontologyFile.encode('utf-8')
self._set_headers('application/rdf+xml', len(msg),
None, callingDomain, False)
self._write(msg)
self._benchmarkGETtimings(GETstartTime, GETtimings,
'show emoji done',
'get onotology')