Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion arbiter/endpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ LocalHandle Endpoint::getLocalHandle(
const std::string local(tmp + basename);
if (isHttpDerived())
{
if (auto fileSize = tryGetSize(subpath, headers, query))
const bool isChunked = env("ARBITER_CHUNKED_DOWNLOAD");
std::unique_ptr<std::size_t> fileSize;
if (isChunked) fileSize = tryGetSize(subpath, headers, query);

if (fileSize)
{
std::ofstream stream(local, streamFlags);
if (!stream.good())
Expand Down