diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-19 20:51:36 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-19 20:51:36 +0000 |
commit | 56a97f11d039e2fd9107ea76ec2d0af2e447136e (patch) | |
tree | cfa742e7a93003084b3541ee37b2872553c42146 | |
parent | face1d284fff27a81c11f17fa38b16f500b4c015 (diff) |
* test/xmlrpc/test_webrick_server.rb (setup_http_server):
should not include 'webrick/https' unless 'use_ssl' because
it fails where openssl is not installed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | test/xmlrpc/test_webrick_server.rb | 16 |
2 files changed, 17 insertions, 5 deletions
@@ -1,3 +1,9 @@ +Tue Sep 20 05:50:22 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> + + * test/xmlrpc/test_webrick_server.rb (setup_http_server): + should not include 'webrick/https' unless 'use_ssl' because + it fails where openssl is not installed. + Tue Sep 20 00:34:07 2005 Yukihiro Matsumoto <matz@ruby-lang.org> * io.c (io_close): call rb_io_close() directly if io is a T_FILE diff --git a/test/xmlrpc/test_webrick_server.rb b/test/xmlrpc/test_webrick_server.rb index e7fed016b0..4cd63cfa74 100644 --- a/test/xmlrpc/test_webrick_server.rb +++ b/test/xmlrpc/test_webrick_server.rb @@ -33,13 +33,19 @@ class Test_Webrick < Test::Unit::TestCase end def setup_http_server(port, use_ssl) - require 'webrick/https' - start_server( + option = { :Port => port, :SSLEnable => use_ssl, - :SSLVerifyClient => ::OpenSSL::SSL::VERIFY_NONE, - :SSLCertName => [] - ) {|w| w.mount('/RPC2', create_servlet) } + } + if use_ssl + require 'webrick/https' + option.update( + :SSLVerifyClient => ::OpenSSL::SSL::VERIFY_NONE, + :SSLCertName => [] + ) + end + + start_server(option) {|w| w.mount('/RPC2', create_servlet) } @s = XMLRPC::Client.new3(:port => port, :use_ssl => use_ssl) end |