diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-18 06:03:43 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-18 06:03:43 +0000 |
| commit | 4281260109874562d78c7f2b6b05a5aacf10afb2 (patch) | |
| tree | 9e236a812f7161e3f6953126ee67d46bbead3a75 /test | |
| parent | 1b31bbe2c43ff8569d319d7c8663daabbb0cd029 (diff) | |
| download | ruby-4281260109874562d78c7f2b6b05a5aacf10afb2.tar.gz ruby-4281260109874562d78c7f2b6b05a5aacf10afb2.tar.xz ruby-4281260109874562d78c7f2b6b05a5aacf10afb2.zip | |
* lib/webrick/ssl.rb (WEBrick::Config::SSL): the default value
of :SSLEnable is false.
* lib/webrick/server.rb (WEBrick::Daemon.start): prepared stdio
don't allow changing its mode.
* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service):
should delete trailing LF from the result of pack("m*").
* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_connect):
- should delete trailing LF from the result of pack("m*").
- clear Request-Line not to send the response by HTTPServer#run.
* lib/webrick/httputils (WEBrick::HTTPUtils.parse_qvalues):
refine regexp (and change the name of a local variable).
* lib/webrick/httputils.rb (WEBrick::HTTPUtils#escape_path): add
new method to escape URI path component.
* lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line): should
escape SCRIPT_NAME and PATH_INFO before being parsed as a URI.
* test/webrick/*, sample/webrick/httpproxy.rb: add new file.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/webrick/test_httpauth.rb | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/test/webrick/test_httpauth.rb b/test/webrick/test_httpauth.rb index 7109ebc2c..75926b162 100644 --- a/test/webrick/test_httpauth.rb +++ b/test/webrick/test_httpauth.rb @@ -3,34 +3,11 @@ require "net/http" require "tempfile" require "webrick" require "webrick/httpauth/basicauth" +require File.join(File.dirname(__FILE__), "utils.rb") class TestWEBrickHTTPAuth < Test::Unit::TestCase - class NullWriter - def NullWriter.<<(msg) - puts msg if $DEBUG - return self - end - end - - def start_httpserver - server = WEBrick::HTTPServer.new( - :BindAddress => "0.0.0.0", :Port => 0, - :Logger => WEBrick::Log.new(NullWriter), - :AccessLog => [[NullWriter, ""]] - ) - thread = nil - begin - thread = Thread.start{ server.start } - addr = server.listeners[0].addr - yield([server, addr[3], addr[1]]) - ensure - server.stop - thread.join - end - end - def test_basic_auth - start_httpserver{|server, addr, port| + TestWEBrick.start_httpserver{|server, addr, port| realm = "WEBrick's realm" path = "/basic_auth" @@ -50,7 +27,7 @@ class TestWEBrickHTTPAuth < Test::Unit::TestCase end def test_basic_auth2 - start_httpserver{|server, addr, port| + TestWEBrick.start_httpserver{|server, addr, port| realm = "WEBrick's realm" path = "/basic_auth2" |
