Changeset

2193:40824a38d505

mod_http_upload: Return nil if no upload slot is found (should prevent conflicts between multiple instances on the same path)
author Kim Alvefur <zash@zash.se>
date Tue, 31 May 2016 17:24:59 +0200 (2016-05-31)
parents 2192:bb8f7785aed7
children 2194:136497948bf0
files mod_http_upload/mod_http_upload.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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