# HG changeset patch # User Kim Alvefur # Date 1611851077 -3600 # Node ID dbba2d44fda20edce82dd83993b300c666246ad4 # Parent f80056b97cf06386820c1263f125faacaa35b6a4 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’ diff -r f80056b97cf0 -r dbba2d44fda2 plugins/mod_http_file_share.lua --- 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