HttpBinaryCacheStore: Treat 403 errors as 404
This commit is contained in:
parent
de88004a9d
commit
88541569a2
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue