mirror of https://gitlab.com/bashrc2/epicyon
Remove debug
parent
0b18e2740d
commit
75dc39de87
22
daemon.py
22
daemon.py
|
@ -9010,15 +9010,13 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
onionDomain: str, i2pDomain: str,
|
onionDomain: str, i2pDomain: str,
|
||||||
GETstartTime, GETtimings: {},
|
GETstartTime, GETtimings: {},
|
||||||
proxyType: str, cookie: str,
|
proxyType: str, cookie: str,
|
||||||
debug: str, atPath: bool) -> bool:
|
debug: str) -> bool:
|
||||||
"""Shows the profile for a person
|
"""Shows the profile for a person
|
||||||
"""
|
"""
|
||||||
# look up a person
|
# look up a person
|
||||||
actorJson = personLookup(domain, path, baseDir)
|
actorJson = personLookup(domain, path, baseDir)
|
||||||
if not actorJson:
|
if not actorJson:
|
||||||
return False
|
return False
|
||||||
if atPath:
|
|
||||||
print('@ detected _showPersonProfile')
|
|
||||||
if self._requestHTTP():
|
if self._requestHTTP():
|
||||||
if not self.server.session:
|
if not self.server.session:
|
||||||
print('Starting new session during person lookup')
|
print('Starting new session during person lookup')
|
||||||
|
@ -9066,10 +9064,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('application/ld+json', msglen,
|
self._set_headers('application/ld+json', msglen,
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
if atPath:
|
|
||||||
print('@ detected outgoing actor: ' + str(actorJson))
|
|
||||||
print('@ detected outgoing headers: ' +
|
|
||||||
str(self.headers).replace('\n', ', '))
|
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
else:
|
else:
|
||||||
self._404()
|
self._404()
|
||||||
|
@ -9757,11 +9751,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def do_GET(self):
|
def do_GET(self):
|
||||||
# if an image is received
|
|
||||||
if self.headers.get('Accept'):
|
|
||||||
if 'image' in self.headers['Accept']:
|
|
||||||
print('image GET header: ' + str(self.headers['Accept']))
|
|
||||||
|
|
||||||
callingDomain = self.server.domainFull
|
callingDomain = self.server.domainFull
|
||||||
if self.headers.get('Host'):
|
if self.headers.get('Host'):
|
||||||
callingDomain = self.headers['Host']
|
callingDomain = self.headers['Host']
|
||||||
|
@ -9839,11 +9828,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'show logout')
|
'show logout')
|
||||||
|
|
||||||
# replace https://domain/@nick with https://domain/users/nick
|
# replace https://domain/@nick with https://domain/users/nick
|
||||||
atPath = False
|
|
||||||
if self.path.startswith('/@'):
|
if self.path.startswith('/@'):
|
||||||
self.path = self.path.replace('/@', '/users/')
|
self.path = self.path.replace('/@', '/users/')
|
||||||
atPath = True
|
|
||||||
print('@ detected: ' + str(self.headers).replace('\n', ', '))
|
|
||||||
|
|
||||||
# redirect music to #nowplaying list
|
# redirect music to #nowplaying list
|
||||||
if self.path == '/music' or self.path == '/nowplaying':
|
if self.path == '/music' or self.path == '/nowplaying':
|
||||||
|
@ -9932,9 +9918,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
||||||
'create session', 'hasAccept')
|
'create session', 'hasAccept')
|
||||||
if atPath:
|
|
||||||
print('@ detected: html ' + str(htmlGET))
|
|
||||||
print('@ detected: path ' + self.path)
|
|
||||||
|
|
||||||
# get css
|
# get css
|
||||||
# Note that this comes before the busy flag to avoid conflicts
|
# Note that this comes before the busy flag to avoid conflicts
|
||||||
|
@ -11864,8 +11847,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.i2pDomain,
|
self.server.i2pDomain,
|
||||||
GETstartTime, GETtimings,
|
GETstartTime, GETtimings,
|
||||||
self.server.proxyType,
|
self.server.proxyType,
|
||||||
cookie, self.server.debug,
|
cookie, self.server.debug):
|
||||||
atPath):
|
|
||||||
return
|
return
|
||||||
|
|
||||||
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
||||||
|
|
Loading…
Reference in New Issue