From a064354b6cc1cd01245f34a0aaa82349abe98428 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 03 2017 09:30:26 +0000 Subject: [PATCH 1/2] Set the content_type and charset of the index page --- diff --git a/mdapi/__init__.py b/mdapi/__init__.py index f99922a..4938d79 100644 --- a/mdapi/__init__.py +++ b/mdapi/__init__.py @@ -350,7 +350,9 @@ def get_supplements(request): @asyncio.coroutine def index(request): - return web.Response(body=INDEX.encode('utf-8')) + return web.Response( + body=INDEX.encode('utf-8'), + content_type='text/html; charset=utf-8') @asyncio.coroutine From 87158c28a0f562324b55f5e3d3395c2a430900c7 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 03 2017 09:30:26 +0000 Subject: [PATCH 2/2] Fix specifying the charset --- diff --git a/mdapi/__init__.py b/mdapi/__init__.py index 4938d79..dc85321 100644 --- a/mdapi/__init__.py +++ b/mdapi/__init__.py @@ -352,7 +352,8 @@ def get_supplements(request): def index(request): return web.Response( body=INDEX.encode('utf-8'), - content_type='text/html; charset=utf-8') + content_type='text/html', + charset='utf-8') @asyncio.coroutine