aboutsummaryrefslogtreecommitdiffstats
path: root/prosody-module
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-08-22 16:57:52 +0200
committersteckbrief <steckbrief@chefmail.de>2016-08-22 16:57:52 +0200
commit59fe1257143125df2510145b2e54b2ec15ed6653 (patch)
tree0c10543bb2a9dbb93dde6f5ae8bce5aed6df10b5 /prosody-module
parentc3c9e08f17c7c74e5f3baeb9a855517b504f89e4 (diff)
exit module after sending error reply in case storage backend returned error code 500
Diffstat (limited to 'prosody-module')
-rw-r--r--prosody-module/mod_http_upload_external/mod_http_upload_external.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/prosody-module/mod_http_upload_external/mod_http_upload_external.lua b/prosody-module/mod_http_upload_external/mod_http_upload_external.lua
index cb59af4..ab7c0e0 100644
--- a/prosody-module/mod_http_upload_external/mod_http_upload_external.lua
+++ b/prosody-module/mod_http_upload_external/mod_http_upload_external.lua
@@ -75,6 +75,7 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event)
-- check the response
if statuscode == 500 then
origin.send(st.error_reply(stanza, "cancel", "service-unavailable", respbody));
+ return true;
elseif statuscode == 406 or statuscode == 400 or statuscode == 403 then
local errobj, pos, err = json.decode(respbody);
if err then
@@ -152,6 +153,7 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event)
-- check the response
if statuscode == 500 then
origin.send(st.error_reply(stanza, "cancel", "service-unavailable", respbody));
+ return true;
elseif statuscode == 406 or statuscode == 400 or statuscode == 403 then
local errobj, pos, err = json.decode(respbody);
if err then