Class: Vagrant::Util::Downloader

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-box-s3/downloader.rb

Instance Method Summary collapse

Instance Method Details

#headObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/vagrant-box-s3/downloader.rb', line 9

def head
  if ::VagrantPlugins::BoxS3::Utils.is_s3_manifest(@source)
    options, subprocess_options = self.options
    options.unshift("-i")
    options << @source

    @logger.info("HEAD (Override): #{@source}")
    result = execute_curl(options, subprocess_options)

    headers, _body = result.stdout.split("\r\n\r\n", 2)
    headers
  else
    original_head
  end
end

#original_headObject



7
# File 'lib/vagrant-box-s3/downloader.rb', line 7

alias_method :original_head, :head