HttpBinaryCacheStore: Treat 403 errors as 404
This commit is contained in:
		
							parent
							
								
									de88004a9d
								
							
						
					
					
						commit
						88541569a2
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -45,7 +45,9 @@ protected: | ||||||
|             downloader->download(cacheUri + "/" + path, options); |             downloader->download(cacheUri + "/" + path, options); | ||||||
|             return true; |             return true; | ||||||
|         } catch (DownloadError & e) { |         } 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; |                 return false; | ||||||
|             throw; |             throw; | ||||||
|         } |         } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue