libstore: remove HttpBinaryCacheStore::getFileContents

the default implementation using getFile does exactly the same thing,
unless the thing being downloaded goes away immediately before we try
to resume a partial download. that's best treated as a different kind
of error though because the target did exist the first time we asked.

Change-Id: Ic0c046bdcd9d9751c6ba78167c68a38d0d2739e9
This commit is contained in:
eldritch horrors
2025-01-20 23:07:44 +01:00
parent 8897c1af45
commit 5f1782a938
-14
View File
@@ -160,20 +160,6 @@ protected:
}
}
std::optional<std::string> getFileContents(const std::string & path) override
{
checkEnabled();
try {
return getFileTransfer()->download(makeURI(path)).second->drain();
} catch (FileTransferError & e) {
if (e.error == FileTransfer::NotFound || e.error == FileTransfer::Forbidden)
return {};
maybeDisable();
throw;
}
}
/**
* This isn't actually necessary read only. We support "upsert" now, so we
* have a notion of authentication via HTTP POST/PUT.