lib/vagrant/util/downloader.rb in vagrant-unbundled-2.2.10.0 vs lib/vagrant/util/downloader.rb in vagrant-unbundled-2.2.14.0
- old
+ new
@@ -27,12 +27,13 @@
SILENCED_HOSTS = [
"vagrantcloud.com".freeze,
"vagrantup.com".freeze
].freeze
- attr_reader :source
+ attr_accessor :source
attr_reader :destination
+ attr_accessor :headers
def initialize(source, destination, options=nil)
options ||= {}
@logger = Log4r::Logger.new("vagrant::util::downloader")
@@ -56,10 +57,10 @@
# Get the various optional values
@auth = options[:auth]
@ca_cert = options[:ca_cert]
@ca_path = options[:ca_path]
@continue = options[:continue]
- @headers = options[:headers]
+ @headers = Array(options[:headers])
@insecure = options[:insecure]
@ui = options[:ui]
@client_cert = options[:client_cert]
@location_trusted = options[:location_trusted]
@checksums = {