Diff

mod_http_upload/mod_http_upload.lua @ 2667:0c7802b95820

mod_http_upload: Fix halting of event propagation when request handler returns
author Kim Alvefur <zash@zash.se>
date Tue, 04 Apr 2017 00:16:17 +0200
parent 2666:99c0b1bacdcd
child 2677:6daaa1ad2559
line wrap: on
line diff
--- a/mod_http_upload/mod_http_upload.lua	Tue Apr 04 00:11:05 2017 +0200
+++ b/mod_http_upload/mod_http_upload.lua	Tue Apr 04 00:16:17 2017 +0200
@@ -123,7 +123,7 @@
 	local request = stanza.tags[1];
 	local filename = request.attr.filename;
 	local filesize = tonumber(request.attr.size);
-	handle_request(origin, stanza, namespace, filename, filesize);
+	return handle_request(origin, stanza, namespace, filename, filesize);
 end);
 
 module:hook("iq/host/"..legacy_namespace..":request", function (event)
@@ -131,7 +131,7 @@
 	local request = stanza.tags[1];
 	local filename = request:get_child_text("filename");
 	local filesize = tonumber(request:get_child_text("size"));
-	handle_request(origin, stanza, legacy_namespace, filename, filesize);
+	return handle_request(origin, stanza, legacy_namespace, filename, filesize);
 end);
 
 -- http service