diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-06 08:26:15 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-06 08:26:15 +0000 |
commit | 2e2ef819345d7268085cd5f066471f06c70496d3 (patch) | |
tree | 9d5af6da4e0546318257752377c7e85ff8116e74 /lib/soap | |
parent | 6ffd5fe37ef9f162bcdf9e7ac639182d58cbc429 (diff) |
* lib/soap/soap.rb(SOAP::Env.getenv): allow upcase environment variable
as well as downcase one.
* lib/soap/netHttpClient.rb(SOAP::NetHttpClient#proxy=): check URI.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/soap')
-rw-r--r-- | lib/soap/netHttpClient.rb | 5 | ||||
-rw-r--r-- | lib/soap/soap.rb | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/soap/netHttpClient.rb b/lib/soap/netHttpClient.rb index a0b3b7ca26..4505de815e 100644 --- a/lib/soap/netHttpClient.rb +++ b/lib/soap/netHttpClient.rb @@ -40,6 +40,11 @@ class NetHttpClient @proxy = nil else @proxy = URI.parse(proxy_str) + if @proxy.scheme == nil or @proxy.scheme.downcase != 'http' or + @proxy.host == nil or @proxy.port == nil + raise ArgumentError.new("unsupported proxy `#{proxy_str}'") + end + @proxy end end diff --git a/lib/soap/soap.rb b/lib/soap/soap.rb index ea2b4db2e1..d00d89b05b 100644 --- a/lib/soap/soap.rb +++ b/lib/soap/soap.rb @@ -100,7 +100,7 @@ end module Env def self.getenv(name) - ENV[name.downcase] || ENV[name] + ENV[name.downcase] || ENV[name.upcase] end use_proxy = getenv('soap_use_proxy') == 'on' |