mirror of https://gitlab.com/bashrc2/epicyon
Debug
parent
1a70ece630
commit
41feec3c1e
|
@ -1824,7 +1824,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# default favicon
|
# default favicon
|
||||||
faviconFilename = \
|
faviconFilename = \
|
||||||
self.server.baseDir + '/img/icons/favicon.ico'
|
self.server.baseDir + '/img/icons/favicon.ico'
|
||||||
|
print('favicon: ' + faviconFilename)
|
||||||
if self._etag_exists(faviconFilename):
|
if self._etag_exists(faviconFilename):
|
||||||
|
print('favicon etag exists')
|
||||||
# The file has not changed
|
# The file has not changed
|
||||||
self._304()
|
self._304()
|
||||||
return
|
return
|
||||||
|
@ -1835,9 +1837,11 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
favBinary, cookie,
|
favBinary, cookie,
|
||||||
callingDomain)
|
callingDomain)
|
||||||
self._write(favBinary)
|
self._write(favBinary)
|
||||||
|
print('favicon sent from cache')
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if os.path.isfile(faviconFilename):
|
if os.path.isfile(faviconFilename):
|
||||||
|
print('favicon image file exists')
|
||||||
with open(faviconFilename, 'rb') as favFile:
|
with open(faviconFilename, 'rb') as favFile:
|
||||||
favBinary = favFile.read()
|
favBinary = favFile.read()
|
||||||
self._set_headers_etag(faviconFilename,
|
self._set_headers_etag(faviconFilename,
|
||||||
|
@ -1846,6 +1850,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
callingDomain)
|
callingDomain)
|
||||||
self._write(favBinary)
|
self._write(favBinary)
|
||||||
self.server.iconsCache['favicon.ico'] = favBinary
|
self.server.iconsCache['favicon.ico'] = favBinary
|
||||||
|
print('favicon sent')
|
||||||
return
|
return
|
||||||
self._404()
|
self._404()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue