aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpclient.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2026-03-03 20:49:01 +0100
committerGitHub Enterprise <[email protected]>2026-03-03 20:49:01 +0100
commit463a0fde16b827c0ec44c9e88fe3c8c8098aa5ea (patch)
tree736553b3ded853fe945bdeea7585631617d171c3 /src/zenhttp/httpclient.cpp
parentfix objectstore uri path parsing (#801) (diff)
downloadzen-463a0fde16b827c0ec44c9e88fe3c8c8098aa5ea.tar.xz
zen-463a0fde16b827c0ec44c9e88fe3c8c8098aa5ea.zip
use multi range requests (#800)
- Improvement: `zen builds download` now uses multi-range requests for blocks to reduce download size - Improvement: `zen oplog-import` now uses partial block with multi-range requests for blocks to reduce download size - Improvement: Improved feedback in log/console during `zen oplog-import` - Improvement: `--allow-partial-block-requests` now defaults to `true` for `zen builds download` and `zen oplog-import` (was `mixed`) - Improvement: Improved range merging analysis when downloading partial blocks
Diffstat (limited to 'src/zenhttp/httpclient.cpp')
-rw-r--r--src/zenhttp/httpclient.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/zenhttp/httpclient.cpp b/src/zenhttp/httpclient.cpp
index f94c58581..281d512cf 100644
--- a/src/zenhttp/httpclient.cpp
+++ b/src/zenhttp/httpclient.cpp
@@ -107,17 +107,14 @@ HttpClientBase::GetAccessToken()
std::vector<std::pair<uint64_t, uint64_t>>
HttpClient::Response::GetRanges(std::span<const std::pair<uint64_t, uint64_t>> OffsetAndLengthPairs) const
{
- std::vector<std::pair<uint64_t, uint64_t>> Result;
- Result.reserve(OffsetAndLengthPairs.size());
if (Ranges.empty())
{
- for (const std::pair<uint64_t, uint64_t>& Range : OffsetAndLengthPairs)
- {
- Result.emplace_back(std::make_pair(Range.first, Range.second));
- }
- return Result;
+ return {};
}
+ std::vector<std::pair<uint64_t, uint64_t>> Result;
+ Result.reserve(OffsetAndLengthPairs.size());
+
auto BoundaryIt = Ranges.begin();
auto OffsetAndLengthPairIt = OffsetAndLengthPairs.begin();
while (OffsetAndLengthPairIt != OffsetAndLengthPairs.end())