Software /
code /
prosody
Diff
plugins/mod_http_errors.lua @ 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 |
parent | 7492:9a749cf8c1ba |
child | 8364:f91ab40a3105 |
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);