diff options
author | Kim Alvefur <zash@zash.se> | 2017-10-27 13:28:34 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-10-27 13:28:34 +0200 |
commit | a624cae351afc239ee1ebe08d29bfbadce8b0a81 (patch) | |
tree | f879aaa5d8c95c4e700f3db1e74e53e5a54f2a4f /plugins/mod_http_errors.lua | |
parent | 8ea1a04ab9626b90c22250c4189a540ea0c58c9e (diff) | |
download | prosody-a624cae351afc239ee1ebe08d29bfbadce8b0a81.tar.gz prosody-a624cae351afc239ee1ebe08d29bfbadce8b0a81.zip |
mod_http_errors: Set Content-Type header to HTML (fixes #1030)
Diffstat (limited to 'plugins/mod_http_errors.lua')
-rw-r--r-- | plugins/mod_http_errors.lua | 3 |
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); |