summaryrefslogtreecommitdiff
path: root/lib/chef/provider/remote_file
diff options
context:
space:
mode:
authorlamont-granquist <lamont@scriptkiddie.org>2014-04-22 15:00:31 -0700
committerlamont-granquist <lamont@scriptkiddie.org>2014-04-22 15:00:31 -0700
commitb84c614bd534a48821e06e7f0bdb21eee203ba41 (patch)
tree5a157453fa573d5b18b97badbac7dfc5ed6570d8 /lib/chef/provider/remote_file
parent37a3f076d19d3f53e59e1a490f0b5a5d384bf460 (diff)
parentab350673594f9d47e37a5760eebfeb87967162a9 (diff)
downloadchef-b84c614bd534a48821e06e7f0bdb21eee203ba41.tar.gz
Merge pull request #1358 from johntdyer/master
CHEF-5116 - Catch HTTPServerException for 404 in remote_file retry
Diffstat (limited to 'lib/chef/provider/remote_file')
-rw-r--r--lib/chef/provider/remote_file/content.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/remote_file/content.rb b/lib/chef/provider/remote_file/content.rb
index 7f9e2332a8..3a8514e077 100644
--- a/lib/chef/provider/remote_file/content.rb
+++ b/lib/chef/provider/remote_file/content.rb
@@ -48,7 +48,7 @@ class Chef
begin
uri = URI.parse(source)
raw_file = grab_file_from_uri(uri)
- rescue SocketError, Errno::ECONNREFUSED, Errno::ENOENT, Errno::EACCES, Timeout::Error, Net::HTTPFatalError, Net::FTPError => e
+ rescue SocketError, Errno::ECONNREFUSED, Errno::ENOENT, Errno::EACCES, Timeout::Error, Net::HTTPServerException, Net::HTTPFatalError, Net::FTPError => e
Chef::Log.warn("#{@new_resource} cannot be downloaded from #{source}: #{e.to_s}")
if source = sources.shift
Chef::Log.info("#{@new_resource} trying to download from another mirror")