Update CHANGELOG for GH-502
This commit is contained in:
parent
4c01a87ab3
commit
331b5c20a8
|
@ -12,6 +12,8 @@
|
|||
available. [GH-556]
|
||||
- NFS should work for FreeBSD hosts now. [GH-510]
|
||||
- SSH executed methods respect `config.ssh.max_tries`. [GH-508]
|
||||
- `vagrant box add` now respects the "no_proxy" environmental variable.
|
||||
[GH-502]
|
||||
|
||||
## 0.8.7 (September 13, 2011)
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ module Vagrant
|
|||
end
|
||||
|
||||
def download!(source_url, destination_file)
|
||||
|
||||
uri = URI.parse(source_url)
|
||||
proxy_uri = resolve_proxy(uri)
|
||||
|
||||
|
@ -76,16 +75,23 @@ module Vagrant
|
|||
|
||||
private
|
||||
|
||||
# This method respects the "http_proxy" and "no_proxy" environmental
|
||||
# variables so that HTTP proxies can properly be used with Vagrant.
|
||||
def resolve_proxy(source_uri)
|
||||
proxy_string = nil
|
||||
if ENV['no_proxy'] && ENV['no_proxy'].split(',').any? { |h| source_uri.host =~ /#{Regexp.quote(h.strip)}$/ }
|
||||
proxy_string = ''
|
||||
else
|
||||
proxy_string = ENV["http_proxy"] || ''
|
||||
proxy_string = ENV["http_proxy"] || ""
|
||||
if !proxy_string.empty? && ENV.has_key?("no_proxy")
|
||||
# Respect the "no_proxy" environmental variable which contains a list
|
||||
# of hosts that a proxy should not be used for.
|
||||
ENV["no_proxy"].split(",").each do |host|
|
||||
if source_uri.host =~ /#{Regexp.quote(host.strip)}$/
|
||||
proxy_string = ""
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
URI.parse(proxy_string)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue