Software /
code /
prosody
Changeset
10574:f70c874b7936
mod_http_errors: Use text from util.errror object if included
This makes util.error objects useful for more than just an error code
container.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 29 Dec 2019 22:20:51 +0100 |
parents | 10573:3b8431eed785 |
children | 10575:5cf8e96575b3 |
files | plugins/mod_http_errors.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_http_errors.lua Sun Dec 29 01:11:55 2019 +0100 +++ b/plugins/mod_http_errors.lua Sun Dec 29 22:20:51 2019 +0100 @@ -73,7 +73,7 @@ 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 or (event.error and event.error.text)); end); module:hook_object_event(server, "http-error", function (event)