Without etag

main
Bob Mottram 2020-05-25 17:26:43 +01:00
parent 0ab9258f3b
commit 447125fbdc
1 changed files with 21 additions and 21 deletions

View File

@ -1115,19 +1115,19 @@ class PubServer(BaseHTTPRequestHandler):
fontType = 'application/font-woff2' fontType = 'application/font-woff2'
fontFilename = \ fontFilename = \
self.server.baseDir + '/fonts/' + fontStr self.server.baseDir + '/fonts/' + fontStr
if self._etag_exists(fontFilename): #if self._etag_exists(fontFilename):
# The file has not changed # The file has not changed
self._304() # self._304()
return # return
if self.server.fontsCache.get(fontStr): #if self.server.fontsCache.get(fontStr):
fontBinary = self.server.fontsCache[fontStr] # fontBinary = self.server.fontsCache[fontStr]
self._set_headers_etag(fontFilename, # self._set_headers_etag(fontFilename,
fontType, # fontType,
fontBinary, cookie, # fontBinary, cookie,
callingDomain) # callingDomain)
self._write(fontBinary) # self._write(fontBinary)
return # return
else: #else:
if os.path.isfile(fontFilename): if os.path.isfile(fontFilename):
with open(fontFilename, 'rb') as avFile: with open(fontFilename, 'rb') as avFile:
fontBinary = avFile.read() fontBinary = avFile.read()