changeset 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
parents 99c0b1bacdcd
children f8fc79b3051a
files mod_http_upload/mod_http_upload.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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