Method: Vagrant::Downloaders::HTTP.match?

Defined in:
lib/vagrant/downloaders/http.rb

.match?(uri) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
15
# File 'lib/vagrant/downloaders/http.rb', line 11

def self.match?(uri)
  # URI.parse barfs on '<drive letter>:\\files \on\ windows'
  extracted = URI.extract(uri, ['http', 'https']).first
  extracted && extracted.include?(uri)
end