Changeset

11334:dbba2d44fda2

mod_http_file_share: Allow started uploads to complete after token expired Otherwise uploads taking longer than 5 minutes would be rejected on completion, and that's probably annoying. Thanks jonas’
author Kim Alvefur <zash@zash.se>
date Thu, 28 Jan 2021 17:24:37 +0100
parents 11333:f80056b97cf0
children 11335:b7acab5e7f57
files plugins/mod_http_file_share.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_http_file_share.lua	Thu Jan 28 17:13:49 2021 +0100
+++ b/plugins/mod_http_file_share.lua	Thu Jan 28 17:24:37 2021 +0100
@@ -169,7 +169,7 @@
 		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