# HG changeset patch # User Kim Alvefur # Date 1509103714 -7200 # Node ID e2460edc2a2feefb18ff4e8969dc9442cca04946 # Parent c7d6c2558a24b689a4f1fcbb1dc620317ce27d6e mod_http_errors: Set Content-Type header to HTML (fixes #1030) diff -r c7d6c2558a24 -r e2460edc2a2f plugins/mod_http_errors.lua --- a/plugins/mod_http_errors.lua Fri Oct 27 14:08:28 2017 +0200 +++ b/plugins/mod_http_errors.lua Fri Oct 27 13:28:34 2017 +0200 @@ -72,5 +72,8 @@ 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);