From 0f0c0b0396b91d71af52689ea1ea1b1ebb4e5547 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 3 Apr 2013 12:01:12 -0700 Subject: [PATCH] Add max redirects for download --- lib/vagrant/util/downloader.rb | 1 + plugins/kernel_v2/config/downloader.rb | 17 ----------------- plugins/kernel_v2/plugin.rb | 5 ----- 3 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 plugins/kernel_v2/config/downloader.rb diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb index d815b692a..f805132b6 100644 --- a/lib/vagrant/util/downloader.rb +++ b/lib/vagrant/util/downloader.rb @@ -30,6 +30,7 @@ module Vagrant # Build the list of parameters to execute with cURL options = [ "--fail", + "--max-redirs", "10", "--output", @destination ] diff --git a/plugins/kernel_v2/config/downloader.rb b/plugins/kernel_v2/config/downloader.rb deleted file mode 100644 index ddf60032c..000000000 --- a/plugins/kernel_v2/config/downloader.rb +++ /dev/null @@ -1,17 +0,0 @@ -module VagrantPlugins - module Kernel_V2 - class DownloaderConfig < Vagrant.plugin("2", :config) - attr_accessor :insecure - - def initialize - super - - @insecure = UNSET_VALUE - end - - def finalize! - @insecure = false if @insecure == UNSET_VALUE - end - end - end -end diff --git a/plugins/kernel_v2/plugin.rb b/plugins/kernel_v2/plugin.rb index 5e010cfa9..55cfcc0dc 100644 --- a/plugins/kernel_v2/plugin.rb +++ b/plugins/kernel_v2/plugin.rb @@ -15,11 +15,6 @@ module VagrantPlugins # "kernel_v1", none of these configuration classes are upgradable. # This is by design, since we can't be sure if they're upgradable # until another version is available. - config("downloader") do - require File.expand_path("../config/downloader", __FILE__) - DownloaderConfig - end - config("ssh") do require File.expand_path("../config/ssh", __FILE__) SSHConfig