summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-06 08:26:15 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-06 08:26:15 +0000
commit2e2ef819345d7268085cd5f066471f06c70496d3 (patch)
tree9d5af6da4e0546318257752377c7e85ff8116e74
parent6ffd5fe37ef9f162bcdf9e7ac639182d58cbc429 (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
-rw-r--r--ChangeLog7
-rw-r--r--lib/soap/netHttpClient.rb5
-rw-r--r--lib/soap/soap.rb2
3 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index aa008502ea..d6d1946d57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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'