forked from indymedia/epicyon
Extra debug
parent
fc78164ba4
commit
2f7b2be363
30
daemon.py
30
daemon.py
|
@ -1334,6 +1334,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
len(msg),
|
len(msg),
|
||||||
None, callingDomain)
|
None, callingDomain)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
|
if self.server.debug:
|
||||||
|
print('Sent manifest: ' + callingDomain)
|
||||||
return
|
return
|
||||||
|
|
||||||
# favicon image
|
# favicon image
|
||||||
|
@ -1353,6 +1355,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.baseDir + '/img/icons/' + favFilename
|
self.server.baseDir + '/img/icons/' + favFilename
|
||||||
if self._etag_exists(faviconFilename):
|
if self._etag_exists(faviconFilename):
|
||||||
# The file has not changed
|
# The file has not changed
|
||||||
|
if self.server.debug:
|
||||||
|
print('favicon icon has not changed: ' + callingDomain)
|
||||||
self._304()
|
self._304()
|
||||||
return
|
return
|
||||||
if self.server.iconsCache.get(favFilename):
|
if self.server.iconsCache.get(favFilename):
|
||||||
|
@ -1362,6 +1366,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
favBinary, cookie,
|
favBinary, cookie,
|
||||||
callingDomain)
|
callingDomain)
|
||||||
self._write(favBinary)
|
self._write(favBinary)
|
||||||
|
if self.server.debug:
|
||||||
|
print('Sent favicon from cache: ' + callingDomain)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if os.path.isfile(faviconFilename):
|
if os.path.isfile(faviconFilename):
|
||||||
|
@ -1373,7 +1379,11 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
callingDomain)
|
callingDomain)
|
||||||
self._write(favBinary)
|
self._write(favBinary)
|
||||||
self.server.iconsCache[favFilename] = favBinary
|
self.server.iconsCache[favFilename] = favBinary
|
||||||
|
if self.server.debug:
|
||||||
|
print('Sent favicon from file: ' + callingDomain)
|
||||||
return
|
return
|
||||||
|
if self.server.debug:
|
||||||
|
print('favicon not sent: ' + callingDomain)
|
||||||
self._404()
|
self._404()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1446,6 +1456,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
fontBinary, cookie,
|
fontBinary, cookie,
|
||||||
callingDomain)
|
callingDomain)
|
||||||
self._write(fontBinary)
|
self._write(fontBinary)
|
||||||
|
if self.server.debug:
|
||||||
|
print('font sent from cache: ' +
|
||||||
|
self.path + ' ' + callingDomain)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if os.path.isfile(fontFilename):
|
if os.path.isfile(fontFilename):
|
||||||
|
@ -1457,7 +1470,12 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
callingDomain)
|
callingDomain)
|
||||||
self._write(fontBinary)
|
self._write(fontBinary)
|
||||||
self.server.fontsCache[fontStr] = fontBinary
|
self.server.fontsCache[fontStr] = fontBinary
|
||||||
|
if self.server.debug:
|
||||||
|
print('font sent from file: ' +
|
||||||
|
self.path + ' ' + callingDomain)
|
||||||
return
|
return
|
||||||
|
if self.server.debug:
|
||||||
|
print('font not found: ' + self.path + ' ' + callingDomain)
|
||||||
self._404()
|
self._404()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1512,7 +1530,13 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self._set_headers('text/xml', len(msg),
|
self._set_headers('text/xml', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
|
if self.server.debug:
|
||||||
|
print('Sent rss2 feed: ' +
|
||||||
|
self.path + ' ' + callingDomain)
|
||||||
return
|
return
|
||||||
|
if self.server.debug:
|
||||||
|
print('Failed to get rss2 feed: ' +
|
||||||
|
self.path + ' ' + callingDomain)
|
||||||
self._404()
|
self._404()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1550,7 +1574,13 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self._set_headers('text/plain; charset=utf-8',
|
self._set_headers('text/plain; charset=utf-8',
|
||||||
len(msg), cookie, callingDomain)
|
len(msg), cookie, callingDomain)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
|
if self.server.debug:
|
||||||
|
print('Sent rss3 feed: ' +
|
||||||
|
self.path + ' ' + callingDomain)
|
||||||
return
|
return
|
||||||
|
if self.server.debug:
|
||||||
|
print('Failed to get rss3 feed: ' +
|
||||||
|
self.path + ' ' + callingDomain)
|
||||||
self._404()
|
self._404()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue