diff options
author | Alex Auvolat <alex@adnab.me> | 2020-05-04 13:09:23 +0000 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-05-04 13:09:23 +0000 |
commit | b46a7788d160f0cec285d77664e09760d25e2144 (patch) | |
tree | 938c28c24390834218fee2320e6d58e8096eb7a0 /src/api/s3_list.rs | |
parent | 16fbb32fd3ac00f76937c2799d01e7607449fa94 (diff) | |
download | garage-b46a7788d160f0cec285d77664e09760d25e2144.tar.gz garage-b46a7788d160f0cec285d77664e09760d25e2144.zip |
Implement HTTP ranges in get
Diffstat (limited to 'src/api/s3_list.rs')
-rw-r--r-- | src/api/s3_list.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/api/s3_list.rs b/src/api/s3_list.rs index d4d8161e..b8babbbf 100644 --- a/src/api/s3_list.rs +++ b/src/api/s3_list.rs @@ -58,10 +58,10 @@ pub async fn handle_list( break 'query_loop; } if let Some(version) = object.versions().iter().find(|x| x.is_data()) { - if result_keys.len() + result_common_prefixes.len() >= max_keys { - truncated = true; - break 'query_loop; - } + if result_keys.len() + result_common_prefixes.len() >= max_keys { + truncated = true; + break 'query_loop; + } let common_prefix = if delimiter.len() > 0 { let relative_key = &object.key[prefix.len()..]; match relative_key.find(delimiter) { @@ -88,8 +88,8 @@ pub async fn handle_list( } } if objects.len() < max_keys + 1 { - truncated = false; - break 'query_loop; + truncated = false; + break 'query_loop; } if objects.len() > 0 { next_chunk_start = objects[objects.len() - 1].key.clone(); |