aboutsummaryrefslogtreecommitdiffstats
path: root/test/webrick/utils.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+0
| | | | | | | | | | | | | | * test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/open-uri: Test server log in server thread.akr2014-11-091-9/+17
| | | | | | | | * test/webrick: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/webrick: Store log in an array.akr2014-11-091-9/+5
| | | | | | | | | | * test/net/http: Ditto. * test/open-uri: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/webrick: Refine log tests.akr2014-11-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/webrick: Examine log and use assert_join_threads.akr2014-11-081-9/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/server.rb: Use a pipe to detect server shutdown.akr2014-05-301-1/+0
| | | | | | | | | | | | | | | | shutdown() or close() for listening socket is not a reliable. Actually, both doesn't work (doesn't wake up select()) on DragonFly BSD 3.6.2. * test/webrick/utils.rb: :ShutdownSocketWithoutClose is not required now to immediate server shutdown detection. This fixes fd leaks. * test/net/http/utils.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Overwrite Ruby's path for cgi in testsnaruse2013-04-181-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/server.rb (module WEBrick::GenericServer): A serverdrbrain2012-04-111-4/+3
| | | | | | | | | | | | | will now continue only when a StandardError subclass is raised. For other exception types the error will be logged at the fatal level and the server will safely stop. Based on a patch by Alex Young. [ruby-trunk - Feature #6236] * test/webrick/test_server.rb: Test for new exception handling behavior. Join the server thread instead of busy-waiting for it to shut down to remove race conditions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/webrick/utils.rb (TestWEBrick::RubyBin): test CGI does not needusa2011-01-201-0/+1
| | | | | | | | to load rubygems. if it activated, ruby raises LoadError about rbconfig.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test: use require_relative.naruse2009-09-121-7/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/webrick/utils.rb (start_server): provide a reference to log ofmame2008-10-291-3/+10
| | | | | | | | | | | | webrick. * test/webrick/test_httpproxy.rb, test/webrick/test_httpauth.rb, test/webrick/test_cgi.rb, test/webrick/test_httpserver.rb, test/webrick/test_server.rb, test/webrick/test_filehandler.rb: use webrick log as an assertion message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpservlet/filehandler.rb: should normalize pathgotoyuzo2008-05-181-0/+12
| | | | | | | | | | | | | | | | | | name in path_info to prevent script disclosure vulnerability on DOSISH filesystems. (fix: CVE-2008-1891) Note: NTFS/FAT filesystem should not be published by the platforms other than Windows. Pathname interpretation (including short filename) is less than perfect. * lib/webrick/httpservlet/abstract.rb (WEBrick::HTTPServlet::AbstracServlet#redirect_to_directory_uri): should escape the value of Location: header. * lib/webrick/httpservlet/cgi_runner.rb: accept interpreter command line arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service):gotoyuzo2007-12-311-3/+7
| | | | | | | | | | call do_XXX which corespond with request method. (WEBrick::HTTPProxyServer#do_CONNECT,do_GET,do_POST,do_HEAD): added. * test/webrick/test_httpproxy.rb: add test for WEBrick::HTTPProxyServer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/webrick/utils.rb: use Proc#yield instead of Proc#call.gotoyuzo2006-07-011-1/+1
| | | | | | | [ruby-dev:28914] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/webrick/utils.rb: resuce LoadError.gotoyuzo2005-01-101-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line): shouldgotoyuzo2005-01-101-0/+1
| | | | | | | | | | | | | | | | | escape SCRIPT_NAME and PATH_INFO before being parsed as a URI. * lib/webrick/httputils.rb (WEBrick::HTTPUtils#escape_path): add new method to escape URI path component. * lib/webrick/ssl.rb (WEBrick::Config::SSL): the default value of :SSLEnable is false. * test/webrick/{test_cgi.rb,webrick.cgi}: new file. * test/webrick/utils.rb: require "webrick/https.h". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service):gotoyuzo2005-01-071-0/+36
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 sesponse by HTTPServer#run. * lib/webrick/httputils (WEBrick::HTTPUtils.parse_qvalues): refine regexp (and change the name of a local variable). * lib/webrick/server.rb (WEBrick::Daemon.start): prepared stdio don't allow changing its mode. * test/webrick/*, sample/webrick/httpproxy.rb: add new files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e