aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/http-binary-cache-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/http-binary-cache-store.cc')
-rw-r--r--src/libstore/http-binary-cache-store.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc
index 0aafd0a11..8a719db15 100644
--- a/src/libstore/http-binary-cache-store.cc
+++ b/src/libstore/http-binary-cache-store.cc
@@ -45,7 +45,9 @@ protected:
downloader->download(cacheUri + "/" + path, options);
return true;
} catch (DownloadError & e) {
- if (e.error == Downloader::NotFound)
+ /* S3 buckets return 403 if a file doesn't exist and the
+ bucket is unlistable, so treat 403 as 404. */
+ if (e.error == Downloader::NotFound || e.error == Downloader::Forbidden)
return false;
throw;
}