This commit is contained in:
Zhou Chaolin 2018-04-15 18:07:37 +00:00 committed by GitHub
commit f5523006ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -97,6 +97,20 @@ class WebSockifyRequestHandler(WebSocketRequestHandler, SimpleHTTPRequestHandler
if self.logger is None:
self.logger = WebSockifyServer.get_logger()
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)
def log_message(self, format, *args):