From 1157280cd8ff44da57a37dfc2f5920e53180f6b4 Mon Sep 17 00:00:00 2001 From: Attila-Mihaly Balazs Date: Mon, 24 Mar 2014 13:07:33 +0200 Subject: [PATCH] Allow for missing content types --- forum/views/meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forum/views/meta.py b/forum/views/meta.py index a47cf1d..e7d1515 100644 --- a/forum/views/meta.py +++ b/forum/views/meta.py @@ -37,7 +37,7 @@ def static(request, title, content): def media(request, skin, path): response = serve(request, "%s/media/%s" % (skin, path), document_root=os.path.join(os.path.dirname(os.path.dirname(__file__)), 'skins').replace('\\', '/')) - content_type = response['Content-Type'] + content_type = response.get('Content-Type', '') if ('charset=' not in content_type): if (content_type.startswith('text') or content_type=='application/x-javascript'): content_type += '; charset=utf-8' -- 2.39.5