Mercurial > prosody-modules
diff mod_register_web/mod_register_web.lua @ 1618:c56baec031e8
mod_register_web: Send Content-Type headers
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 26 Feb 2015 15:31:25 +0100 |
parents | 1aa894db3585 |
children | 32604bf33a4c |
line wrap: on
line diff
--- a/mod_register_web/mod_register_web.lua Wed Feb 25 17:27:00 2015 +0000 +++ b/mod_register_web/mod_register_web.lua Thu Feb 26 15:31:25 2015 +0100 @@ -101,8 +101,9 @@ end function generate_page(event, display_options) - local request = event.request; + local request, response = event.request, event.response; + response.headers.content_type = "text/html; charset=utf-8"; return render(register_tpl, { path = request.path; hostname = module.host; notice = display_options and display_options.register_error or ""; @@ -154,6 +155,7 @@ function generate_register_response(event, form, ok, err) local message; + event.response.headers.content_type = "text/html; charset=utf-8"; if ok then return generate_success(event, form); else