Bypass mime-type map in python3 env
This commit is contained in:
parent
a69d558fe3
commit
3e46b41caa
|
|
@ -97,18 +97,19 @@ class WebSockifyRequestHandler(WebSocketRequestHandler, SimpleHTTPRequestHandler
|
|||
if self.logger is None:
|
||||
self.logger = WebSockifyServer.get_logger()
|
||||
|
||||
self.extensions_map = {
|
||||
'.manifest': 'text/cache-manifest',
|
||||
'.html': 'text/html',
|
||||
'.png': 'image/png',
|
||||
'.jpg': 'image/jpg',
|
||||
'.svg': 'image/svg+xml',
|
||||
'.css': 'text/css',
|
||||
'.js': 'application/x-javascript',
|
||||
'.json': 'application/json',
|
||||
'.xml': 'application/xml',
|
||||
'': 'application/octet-stream', # Default
|
||||
}
|
||||
if sys.version_info[0] < 3:
|
||||
self.extensions_map = {
|
||||
'.manifest': 'text/cache-manifest',
|
||||
'.html': 'text/html',
|
||||
'.png': 'image/png',
|
||||
'.jpg': 'image/jpg',
|
||||
'.svg': 'image/svg+xml',
|
||||
'.css': 'text/css',
|
||||
'.js': 'application/x-javascript',
|
||||
'.json': 'application/json',
|
||||
'.xml': 'application/xml',
|
||||
'': 'application/octet-stream', # Default
|
||||
}
|
||||
|
||||
WebSocketRequestHandler.__init__(self, req, addr, server)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue