aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-28 17:24:37 +0100
committerKim Alvefur <zash@zash.se>2021-01-28 17:24:37 +0100
commit2c8349a602275f2cd9f3a96832891635f81ab628 (patch)
tree28d4cd7407c542f5b20a0898d57fa2dc363e9fda
parent08d9ba953a64c9c17d4834cd77680af61b7854e4 (diff)
downloadprosody-2c8349a602275f2cd9f3a96832891635f81ab628.tar.gz
prosody-2c8349a602275f2cd9f3a96832891635f81ab628.zip
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’
-rw-r--r--plugins/mod_http_file_share.lua2
1 files changed, 1 insertions, 1 deletions
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