From 63a4002a6619c9a50fc5b8bf39875a7fb44cb4d3 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Thu, 19 Oct 2017 11:40:59 +0200 Subject: [PATCH] fix content-type --- server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index c1b25c1..6ffba6f 100644 --- a/server.py +++ b/server.py @@ -253,9 +253,9 @@ class Anonymous_Github: os.path.basename(os.path.join(cache_path, path))),\ {'Content-Type': get_type_content(path, path, data, g_repo)} elif os.path.exists(os.path.join(cache_path, path, "index.html")): - return send_from_directory(os.path.join(cache_path, path), "index.html") + return send_from_directory(os.path.join(cache_path, path), "index.html"), {'Content-Type': 'text/html; charset=utf-8'} elif os.path.exists(os.path.join(cache_path, path, "README.md")): - return send_from_directory(os.path.join(cache_path, path), "README.md") + return send_from_directory(os.path.join(cache_path, path), "README.md"), {'Content-Type': 'text/html; charset=utf-8'} clean_path = path if len(clean_path) > 0 and clean_path[-1] == '/':