From 0289a561e65eb736cab238cc6d5b20be7aad3482 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 28 Jan 2021 17:24:37 +0100 Subject: mod_http_file_share: Allow started uploads to complete after token expired MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise uploads taking longer than 5 minutes would be rejected on completion, and that's probably annoying. Thanks jonas’ --- plugins/mod_http_file_share.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_http_file_share.lua') diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua index e06ff82b..e9c00399 100644 --- a/plugins/mod_http_file_share.lua +++ b/plugins/mod_http_file_share.lua @@ -169,7 +169,7 @@ function handle_upload(event, path) -- PUT /upload/:slot module:log("debug", "Unauthorized or invalid token: %s, %q", authed, upload_info); return 401; end - if upload_info.exp < os.time() then + if not request.body_sink and upload_info.exp < os.time() then module:log("debug", "Authorization token expired on %s", dt.datetime(upload_info.exp)); return 410; end -- cgit v1.2.3