зеркало из https://github.com/github/ruby.git
lib/open-uri.rb (URI::Generic#find_proxy): warn HTTP_PROXY.
raise an errror on non-http proxy URI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
976226b5de
Коммит
192eb734bf
|
@ -1,3 +1,8 @@
|
|||
Sun Feb 1 03:07:25 2004 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* lib/open-uri.rb (URI::Generic#find_proxy): warn HTTP_PROXY.
|
||||
raise an errror on non-http proxy URI.
|
||||
|
||||
Sun Feb 1 00:57:41 2004 Kouhei Sutou <kou@cozmixng.org>
|
||||
|
||||
* lib/rss/parser.rb (RSS::Parser): added @@default_parser. Used
|
||||
|
|
|
@ -477,12 +477,21 @@ module URI
|
|||
# Use CGI_HTTP_PROXY. cf. libwww-perl.
|
||||
proxy_uri = ENV["CGI_#{name.upcase}"]
|
||||
end
|
||||
elsif name == 'http_proxy'
|
||||
unless proxy_uri = ENV[name]
|
||||
if proxy_uri = ENV[name.upcase]
|
||||
warn 'The environment variable HTTP_PROXY is discouraged. Use http_proxy.'
|
||||
end
|
||||
end
|
||||
else
|
||||
proxy_uri = ENV[name] || ENV[name.upcase]
|
||||
end
|
||||
|
||||
if proxy_uri
|
||||
proxy_uri = URI.parse(proxy_uri)
|
||||
unless URI::HTTP === proxy_uri
|
||||
raise "Non-http proxy URI: #{proxy_uri}"
|
||||
end
|
||||
name = 'no_proxy'
|
||||
if no_proxy = ENV[name] || ENV[name.upcase]
|
||||
no_proxy.scan(/([^:,]*)(?::(\d+))?/) {|host, port|
|
||||
|
|
Загрузка…
Ссылка в новой задаче