From a624cae351afc239ee1ebe08d29bfbadce8b0a81 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 27 Oct 2017 13:28:34 +0200 Subject: mod_http_errors: Set Content-Type header to HTML (fixes #1030) --- plugins/mod_http_errors.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/mod_http_errors.lua') diff --git a/plugins/mod_http_errors.lua b/plugins/mod_http_errors.lua index 17d357e5..d8646268 100644 --- a/plugins/mod_http_errors.lua +++ b/plugins/mod_http_errors.lua @@ -72,5 +72,8 @@ local function get_page(code, extra) end module:hook_object_event(server, "http-error", function (event) + if event.response then + event.response.headers.content_type = "text/html; charset=utf-8"; + end return get_page(event.code, (show_private and event.private_message) or event.message); end); -- cgit v1.2.3