mod_http_errors: Set Content-Type header to HTML (fixes #1030)

This commit is contained in:
Kim Alvefur 2017-10-27 13:28:34 +02:00
parent 843edf3cb1
commit 44860ff0db

View file

@ -72,5 +72,8 @@ local function get_page(code, extra)
end end
module:hook_object_event(server, "http-error", function (event) 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); return get_page(event.code, (show_private and event.private_message) or event.message);
end); end);