aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http_errors.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_http_errors.lua')
-rw-r--r--plugins/mod_http_errors.lua3
1 files changed, 3 insertions, 0 deletions
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);