main
Bob Mottram 2020-07-18 19:26:05 +01:00
parent d34b1ef700
commit ceb264a340
1 changed files with 3 additions and 2 deletions

View File

@ -1321,6 +1321,7 @@ class PubServer(BaseHTTPRequestHandler):
# get fonts
if htmlGET and '/fonts/' in self.path:
fontStr = self.path.split('/fonts/')[1]
print('fontStr: ' + fontStr)
if fontStr.endswith('.otf') or \
fontStr.endswith('.ttf') or \
fontStr.endswith('.woff') or \
@ -1349,8 +1350,8 @@ class PubServer(BaseHTTPRequestHandler):
return
else:
if os.path.isfile(fontFilename):
with open(fontFilename, 'rb') as avFile:
fontBinary = avFile.read()
with open(fontFilename, 'rb') as fontFile:
fontBinary = fontFile.read()
self._set_headers_etag(fontFilename,
fontType,
fontBinary, cookie,