mirror of https://gitlab.com/bashrc2/epicyon
Font mime types according to mozilla documentation
parent
b6dc900305
commit
d2f7a4e210
|
@ -681,10 +681,10 @@ def saveFontInFormPOST(fontBytes, debug: bool,
|
|||
# directly search the binary array for the beginning
|
||||
# of a font file
|
||||
extensionList = {
|
||||
'wOFF': 'application/font-woff',
|
||||
'wOF2': 'application/font-woff2',
|
||||
'ttf': 'application/x-font-truetype',
|
||||
'OTTO': 'application/x-font-opentype'
|
||||
'wOFF': 'font/woff',
|
||||
'wOF2': 'font/woff2',
|
||||
'ttf': 'font/ttf',
|
||||
'OTTO': 'font/otf'
|
||||
}
|
||||
detectedExtension = None
|
||||
for extension, contentType in extensionList.items():
|
||||
|
|
|
@ -1112,13 +1112,13 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
fontStr.endswith('.woff') or \
|
||||
fontStr.endswith('.woff2'):
|
||||
if fontStr.endswith('.otf'):
|
||||
fontType = 'application/x-font-opentype'
|
||||
fontType = 'font/otf'
|
||||
elif fontStr.endswith('.ttf'):
|
||||
fontType = 'application/x-font-truetype'
|
||||
fontType = 'font/ttf'
|
||||
elif fontStr.endswith('.woff'):
|
||||
fontType = 'application/font-woff'
|
||||
fontType = 'font/woff'
|
||||
else:
|
||||
fontType = 'application/font-woff2'
|
||||
fontType = 'font/woff2'
|
||||
fontFilename = \
|
||||
self.server.baseDir + '/fonts/' + fontStr
|
||||
if self._etag_exists(fontFilename):
|
||||
|
|
Loading…
Reference in New Issue