mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
server: for extension_map, refer to upstream version rather than only overwriting it
This commit is contained in:
parent
5803052bb7
commit
98372c9869
1 changed files with 10 additions and 13 deletions
|
|
@ -43,19 +43,16 @@ def parse_arguments():
|
||||||
class ComplexHTTPRequestHandler(server.SimpleHTTPRequestHandler):
|
class ComplexHTTPRequestHandler(server.SimpleHTTPRequestHandler):
|
||||||
SUFFIXES = ['.html', '/index.html', '/', '']
|
SUFFIXES = ['.html', '/index.html', '/', '']
|
||||||
|
|
||||||
extensions_map = _encodings_map_default = {
|
extensions_map = {
|
||||||
# included in Python default implementation
|
**server.SimpleHTTPRequestHandler.extensions_map,
|
||||||
'.gz': 'application/gzip',
|
** {
|
||||||
'.Z': 'application/octet-stream',
|
# web fonts
|
||||||
'.bz2': 'application/x-bzip2',
|
".oft": "font/oft",
|
||||||
'.xz': 'application/x-xz',
|
".sfnt": "font/sfnt",
|
||||||
|
".ttf": "font/ttf",
|
||||||
# web fonts
|
".woff": "font/woff",
|
||||||
".oft": "font/oft",
|
".woff2": "font/woff2",
|
||||||
".sfnt": "font/sfnt",
|
},
|
||||||
".ttf": "font/ttf",
|
|
||||||
".woff": "font/woff",
|
|
||||||
".woff2": "font/woff2",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def translate_path(self, path):
|
def translate_path(self, path):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue