diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/soap/netHttpClient.rb | 5 | ||||
-rw-r--r-- | lib/soap/soap.rb | 2 |
3 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,10 @@ +Sat Dec 6 17:23:00 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org> + + * 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. + Fri Dec 5 23:22:30 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> * lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_raises, 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' |