mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 21:57:45 +03:00
mod_http_errors: Set Content-Type header to HTML (fixes #1030)
This commit is contained in:
parent
843edf3cb1
commit
44860ff0db
1 changed files with 3 additions and 0 deletions
|
@ -72,5 +72,8 @@ local function get_page(code, extra)
|
||||||
end
|
end
|
||||||
|
|
||||||
module:hook_object_event(server, "http-error", function (event)
|
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);
|
return get_page(event.code, (show_private and event.private_message) or event.message);
|
||||||
end);
|
end);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue