diff --git a/content.py b/content.py index a1073d02..5237b235 100644 --- a/content.py +++ b/content.py @@ -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(): diff --git a/daemon.py b/daemon.py index daba5e1f..4ba589e3 100644 --- a/daemon.py +++ b/daemon.py @@ -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):