Mercurial > prosody-modules
changeset 383:4099f0837936
mod_muc_log_http: Added assertion to ensure proper failure on empty responses.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 02:21:40 +0500 (2011-07-24) |
parents | 19469f3ad6d6 |
children | 79983e658bb5 |
files | mod_muc_log_http/muc_log_http/mod_muc_log_http.lua |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua Mon Jul 25 02:21:40 2011 +0500 +++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua Mon Jul 25 02:21:40 2011 +0500 @@ -71,10 +71,9 @@ end function createDoc(body) - if body then - body = body:gsub("%%", "%%%%"); - return html.doc:gsub("###BODY_STUFF###", body); - end + assert(body, "<nil> HTTP response"); + body = body:gsub("%%", "%%%%"); + return html.doc:gsub("###BODY_STUFF###", body); end function urlunescape (escapedUrl)