aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-10-27 13:28:34 +0200
committerKim Alvefur <zash@zash.se>2017-10-27 13:28:34 +0200
commit44860ff0db890f17c857f579192e442beb8e78ff (patch)
treef879aaa5d8c95c4e700f3db1e74e53e5a54f2a4f /plugins
parent843edf3cb1f16ef3e3b3c272e424ec3d3e5192e3 (diff)
downloadprosody-44860ff0db890f17c857f579192e442beb8e78ff.tar.gz
prosody-44860ff0db890f17c857f579192e442beb8e78ff.zip
mod_http_errors: Set Content-Type header to HTML (fixes #1030)
Diffstat (limited to 'plugins')
-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);