comparison mod_storage_s3/mod_storage_s3.lua @ 5762:ff8b6d0b3bfa

mod_storage_s3: Fix mapping archive query limit to ?max-keys=
author Kim Alvefur <zash@zash.se>
date Sat, 02 Dec 2023 13:26:31 +0100
parents 59e38aaa3ec1
children
comparison
equal deleted inserted replaced
5761:754f8eaad34c 5762:ff8b6d0b3bfa
247 end 247 end
248 248
249 prefix = table.concat(prefix, "/").."/"; 249 prefix = table.concat(prefix, "/").."/";
250 local list_result, err = async.wait_for(new_request(self, "GET", bucket_path, { 250 local list_result, err = async.wait_for(new_request(self, "GET", bucket_path, {
251 prefix = prefix; 251 prefix = prefix;
252 ["max-keys"] = query["max"] and tostring(query["max"]); 252 ["max-keys"] = query["limit"] and tostring(query["limit"]);
253 })); 253 }));
254 if err or list_result.code ~= 200 then 254 if err or list_result.code ~= 200 then
255 return nil, err; 255 return nil, err;
256 end 256 end
257 local list_bucket_result = xml.parse(list_result.body); 257 local list_bucket_result = xml.parse(list_result.body);