diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-03-30T09·17+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-03-30T09·17+0200 |
commit | 88541569a2acded0e4999368a4724c96d6ed37e7 (patch) | |
tree | d7a5c938e86dfadd98dbb36651846ff023e39d22 /src/libstore | |
parent | de88004a9d5f257787f405bad8859c88c13e816d (diff) |
HttpBinaryCacheStore: Treat 403 errors as 404
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/http-binary-cache-store.cc | 4 |
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 0aafd0a11467..8a719db150aa 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; } |