Software /
code /
prosody
Changeset
8363:e2460edc2a2f
mod_http_errors: Set Content-Type header to HTML (fixes #1030)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 27 Oct 2017 13:28:34 +0200 |
parents | 8362:c7d6c2558a24 |
children | 8364:f91ab40a3105 |
files | plugins/mod_http_errors.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);