From 6398f79853f73fd307f5ecd266a94644ecf625b9 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 24 Jul 2013 10:52:15 +0000 Subject: * lib/uri/generic.rb (find_proxy): raise BadURIError if the URI is a relative URI. [Bug #8645] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/uri/generic.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/uri/generic.rb') diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb index 1d8963af4d..387682b5b5 100644 --- a/lib/uri/generic.rb +++ b/lib/uri/generic.rb @@ -1611,6 +1611,7 @@ module URI # http_proxy is not used too if the variable is case insensitive. # CGI_HTTP_PROXY can be used instead. def find_proxy + raise BadURIError, "relative URI: #{self}" if self.relative? name = self.scheme.downcase + '_proxy' proxy_uri = nil if name == 'http_proxy' && ENV.include?('REQUEST_METHOD') # CGI? -- cgit v1.2.3