mod_http_upload: Return nil if no upload slot is found (should prevent conflicts between multiple instances on the same path)
authorKim Alvefur <zash@zash.se>
Tue, 31 May 2016 17:24:59 +0200
changeset 2197 40824a38d505
parent 2196 bb8f7785aed7
child 2198 136497948bf0
mod_http_upload: Return nil if no upload slot is found (should prevent conflicts between multiple instances on the same path)
mod_http_upload/mod_http_upload.lua
--- a/mod_http_upload/mod_http_upload.lua	Tue May 31 17:13:48 2016 +0200
+++ b/mod_http_upload/mod_http_upload.lua	Tue May 31 17:24:59 2016 +0200
@@ -84,7 +84,7 @@
 local function upload_data(event, path)
 	if not pending_slots[path] then
 		module:log("warn", "Attempt to upload to unknown slot %q", path);
-		return 401;
+		return; -- 404
 	end
 	local random, filename = path:match("^([^/]+)/([^/]+)$");
 	if not random then