diff options
author | steckbrief <steckbrief@chefmail.de> | 2017-05-03 09:45:19 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2017-05-03 09:45:19 +0200 |
commit | bcfe8b2d97520e699377b41a1e024185fc7813dc (patch) | |
tree | bd23c6e8d73338a51e8f167df51e0a74f52366d9 /prosody-module | |
parent | 9cd578978fcb4fbd8d656afa96280a6f53c5b035 (diff) |
Fixed error stanzas to clients to include additional information as intended
Diffstat (limited to 'prosody-module')
-rw-r--r-- | prosody-module/mod_http_upload_external/mod_http_upload_external.lua | 24 |
1 files changed, 12 insertions, 12 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 f88b29c..a9b4551 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 @@ -103,19 +103,19 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event) origin.send(st.error_reply(stanza, "modify", "not-acceptable", errobj.msg)); return true; elseif errobj.err_code == 2 then - origin.send(st.error_reply(stanza, "modify", "not-acceptable", errobj.msg, - st.stanza("file-too-large", {xmlns=xmlns_http_upload}) - :tag("max-size"):text(errobj.parameters.max_file_size))); + origin.send(st.error_reply(stanza, "modify", "not-acceptable", errobj.msg) + :tag("file-too-large", {xmlns=xmlns_http_upload}) + :tag("max-size"):text(errobj.parameters.max_file_size)); return true; elseif errobj.err_code == 3 then - origin.send(st.error_reply(stanza, "modify", "not-acceptable", errobj.msg, - st.stanza("invalid-character", {xmlns=xmlns_http_upload}) - :text(errobj.parameters.invalid_character))); + origin.send(st.error_reply(stanza, "modify", "not-acceptable", errobj.msg) + :tag("invalid-character", {xmlns=xmlns_http_upload}) + :text(errobj.parameters.invalid_character)); return true; elseif errobj.err_code == 4 then - origin.send(st.error_reply(stanza, "cancel", "internal-server-error", errobj.msg, - st.stanza("missing-parameter", {xmlns=xmlns_http_upload}) - :text(errobj.parameters.missing_parameter))); + origin.send(st.error_reply(stanza, "cancel", "internal-server-error", errobj.msg) + :tag("missing-parameter", {xmlns=xmlns_http_upload}) + :text(errobj.parameters.missing_parameter)); return true; else origin.send(st.error_reply(stanza, "cancel", "undefined-condition", "unknown err_code")); @@ -185,9 +185,9 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event) else if errobj["err_code"] ~= nil and errobj["msg"] ~= nil then if errobj.err_code == 4 then - origin.send(st.error_reply(stanza, "cancel", "internal-server-error", errobj.msg, - st.stanza("missing-parameter", {xmlns=xmlns_http_upload}) - :text(errobj.parameters.missing_parameter))); + origin.send(st.error_reply(stanza, "cancel", "internal-server-error", errobj.msg) + :tag("missing-parameter", {xmlns=xmlns_http_upload}) + :text(errobj.parameters.missing_parameter)); return true; else origin.send(st.error_reply(stanza, "cancel", "undefined-condition", "unknown err_code")); |