aboutsummaryrefslogtreecommitdiffstats
path: root/prosody-module
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-08-22 16:03:10 +0200
committersteckbrief <steckbrief@chefmail.de>2016-08-22 16:03:10 +0200
commit6950c42925396e5edfffe4746522bbf35de36282 (patch)
treed6e478cbd5094b35c79e72a2f8ccf1c98db9803c /prosody-module
parent3e797e3fe1ea662b308ec2797172eed65a4ce532 (diff)
Fixed string comparison from not equals to equals for slot_type check and added additional debug log message
Diffstat (limited to 'prosody-module')
-rw-r--r--prosody-module/mod_http_upload_external/mod_http_upload_external.lua5
1 files changed, 3 insertions, 2 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 335a9d1..cb59af4 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
@@ -43,7 +43,8 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event)
return true;
end
local slot_type = request.attr.type;
- if not slot_type or slot_type ~= "upload" then
+ module:log("debug", "incoming request is of type " .. slot_type);
+ if not slot_type or slot_type == "upload" then
-- validate
local filename = request:get_child_text("filename");
if not filename then
@@ -134,7 +135,7 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event)
reply:tag("get"):text(get_url):up();
reply:tag("put"):text(put_url):up();
origin.send(reply);
- elseif slot_type ~= "delete" then
+ elseif slot_type == "delete" then
-- validate
local fileurl = request:get_child_text("fileurl");
if not fileurl then