S3BinaryCacheStore::isValidPath(): Do a GET instead of HEAD

This commit is contained in:
Eelco Dolstra
2016-02-19 17:41:11 +01:00
parent bd76f9120a
commit 2b76094a23
4 changed files with 33 additions and 3 deletions

View File

@@ -103,12 +103,12 @@ NarInfo BinaryCacheStore::readNarInfo(const Path & storePath)
}
}
stats.narInfoRead++;
auto narInfoFile = narInfoFileFor(storePath);
auto narInfo = make_ref<NarInfo>(getFile(narInfoFile), narInfoFile);
assert(narInfo->path == storePath);
stats.narInfoRead++;
if (publicKeys) {
if (!narInfo->checkSignature(*publicKeys))
throw Error(format("invalid signature on NAR info file %1%") % narInfoFile);