summaryrefslogtreecommitdiff
path: root/test/webrick
AgeCommit message (Collapse)Author
2017-09-13Fix a typo.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18webrick: fix SNI supportnormal
* lib/webrick/https.rb: check ssl context of virtual host. * lib/webrick/ssl.rb: ensure to return ssl context. * test/webrick/test_https.rb: test returned cert is correct. [Feature #13729][ruby-dev:50173] Author: Tietew <tietew@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-07webrick: add Server Name Indication (SNI)normal
* lib/webrick/https.rb: servername_cb implementation. * lib/webrick/ssl.rb: abstract servername_cb. * test/webrick/test_https.rb: test. [ruby-dev:50165] [Feature #13729] Author: Tietew <tietew@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25Import gemspechsbt
Import gemspec and test file from ruby/webrick. * webrick.gemspec: Update files and dependency for standalone gem. * test/webrick/utils.rb: Added explicitly loading of EnvUtil for test suite without ruby core test suite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07Delay Utils.getservername until needed.shugo
There is no need to call Utils.getservername when the :ServerName option is specified, so delay Utils.getservername until needed to avoid unnecessary DNS lookups. [ruby-core:78492] [Bug #13007] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29webrick: don't use OpenSSL::TestUtils from webrick testsrhe
Follow net/http and open-uri. Don't rely on the constants/methods from OpenSSL::TestUtils. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27* lib/cgi/cookie.rb (parse): don't allow , as a separator. [Bug #12791]naruse
* lib/webrick/cookie.rb (parse): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-23test_ssl_server.rb: fix FD leaknobu
* test/webrick/test_ssl_server.rb (assert_self_signed_cert): close underlying TCP socket to fix FD leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22webrick: filter out HTTP_PROXY for CGIHandlernormal
* lib/webrick/httpservlet/cgihandler.rb (do_GET): delete HTTP_PROXY * test/webrick/test_cgi.rb (test_cgi_env): new test * test/webrick/webrick.cgi (do_GET): new endpoint to dump env [ruby-core:76511] [Bug #12610] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-21Multiple values X-Forwarded-Proto in webricknobu
* lib/webrick/httprequest.rb (setup_forwarded_info): Use the first value in X-Forwarded-Proto, if header contains multiple comma separated values. Some middlewares may add these values to the list, not replacing. [Fix GH-1386] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09webrick/utils.rb: suppress messagesnobu
* test/webrick/utils.rb (TestWEBrick#start_server): suppress progress messages from WEBrick::Utils#create_self_signed_cert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09test_ssl_server.rb: assert_self_signed_certnobu
* test/webrick/test_ssl_server.rb (assert_self_signed_cert): extract common assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-07* lib/webrick/ssl.rb: Accept string value for SSLCertName. It is usedhsbt
to invoke ssl server with command line. [fix GH-1329] Patch by @kerlin * test/webrick/test_ssl_server.rb: Added test for GH-1329 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-07* test/webrick/test_ssl_server.rb: Added basic test for `webrick/ssl`hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29* lib/webrick/httpresponse.rb: Move error_body to method. It allow tohsbt
override the body more easily. [fix GH-1307] * test/webrick/test_httpresponse.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-05leakchecker.rb: remove temporary measurenobu
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#watcher): make watcher thread restartable. * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#terminate): new method to terminate watcher thread. * test/lib/leakchecker.rb (LeakChecker#find_threads): revert r46941. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-24fix common misspelling [ci skip]nobu
* compile.c, cont.c, doc, man: fix common misspelling. [ruby-core:72466] [Bug #11870] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
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
2015-12-06* test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): gave up the testusa
of binary path info test on Windows because the test had passed occasionally as the comment said. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* test/webrick/test_utils.rb (TestWEBrickUtils#test_nested_timeout_outer): seemsusa
to be too short for mswin CI. fixed occasional failure introduced at r51235. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14test_filehandler.rb: fix UNC path failurenobu
* test/webrick/test_filehandler.rb (test_short_filename): pass document root path to cmd.exe instead of chdir there, as cmd.exe does not start on UNC path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14webrick/test_utils.rb: no timeout during assertionnobu
* test/webrick/test_utils.rb (assert_expired): separate negated assertion and block timeout excecptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14webrick/utils.rb: wakeup immediatelynobu
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#register): notify the handler thread of new timeout registration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14test_utils.rb: splitnobu
* test/webrick/test_utils.rb (TestWEBrickUtils#do_tet_timeout): split into tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14webrick/server.rb: stop immediatelynobu
* lib/webrick/server.rb (WEBrick::GenericServer#start): flush shutdown pipe. * lib/webrick/server.rb (WEBrick::GenericServer#stop): request the server to stop immediately by sending data via shutdown pipe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-13use Timeout.timeoutnobu
* time: Object#timeout has been deprecated a long time ago, use Timeout.timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02use assert_raisenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-16* lib/webrick/server.rb: Fix regression bug in WEBrick'shsbt
:DoNotReverseLookup config option implementation. [fix GH-731] Patch by @vais * test/webrick/test_do_not_reverse_lookup.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* lib/webrick/server.rb: Invoke setup_shutdown_pipe in start methodakr
instead of listen method. [ruby-core:68476] [Bug #10956] Reported by Shintaro Kojima. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-06* test/webrick/test_filehandler.rb: on vboxsf (on VirtualBoxko1
on Windows 7), file name and permissions are strange (can access by short file name and so on). Simply skip on such tests on such FS. To detect strange FS, this patch use a part of code `File.executable?(__FILE__)`. Please correct them if there are better ways. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11test_utils.rb: dynamically chosen port numbernobu
* test/webrick/test_utils.rb (test_create_listeners): use dynamically chosen port number, not hardcoded port number. [ruby-core:67508] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02* lib/webrick/utils.rb: removed unused argument variable.hsbt
[fix GH-356] Patch by @vipulnsward * lib/webrick/server.rb: ditto. * lib/webrick/ssl.rb: ditto. * test/webrick/test_utils.rb: added test for WEBrick::Utils#create_listeners. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13skip old OpenSSLnobu
* test/open-uri/test_ssl.rb, test/webrick/test_httpproxy.rb: also depends on test/openssl/utils.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* 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
2014-11-10* lib/webrick/server.rb: Setup shutdown pipe in listen method.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09* lib/webrick/server.rb (initialize): Initialize shutdown pipe hereakr
to avoid race condition. (cleanup_shutdown_pipe): New private method. (cleanup_listener): Extracted from shutdown method. Call this method from start method to avoid race condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09* test/webrick/webrick.cgi: Don't use debug mode.akr
* test/webrick/webrick_long_filename.cgi: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09* test/open-uri: Test server log in server thread.akr
* test/webrick: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09* test/webrick: Fix the argument order of assert_equal.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09* test/webrick: Store log in an array.akr
* 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
2014-11-09Fix previous change.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09* test/webrick: Refine log tests.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-08* test/webrick: Examine log and use assert_join_threads.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-30Close FDs.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-30* lib/webrick/server.rb: Use a pipe to detect server shutdown.akr
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
2014-05-08webrick/httpserver.rb: Stop handling requests on shutdownnobu
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): stop handling requests on shutdown, even if the socket is readable and IO.select() returns true. [Fixes GH-607] * lib/webrick/server.rb (WEBrick::GenericServer#start): IO.select() raises ENOTSOCK on shutdown on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11* test: get rid of warnings.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-18* test/socket/test_addrinfo.rb: remove unused variables.hsbt
* test/socket/test_nonblock.rb: ditto. * test/socket/test_socket.rb: ditto. * test/socket/test_unix.rb: ditto. * test/testunit/test_parallel.rb: ditto. * test/webrick/test_filehandler.rb: ditto. * test/xmlrpc/test_features.rb: ditto. * test/zlib/test_zlib.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08* test/webrick/test_httpresponse.rb (test_send_body_*_chunked): theseusa
expectations assumes that the IOs are binmode. fixed test failures introduced at r42427 on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-07* lib/webrick/httpresponse.rb: Allow #body to be an IO-like objectdrbrain
that responds to #readpartial and #read. [ruby-trunk - Feature #8155] * NEWS: NEWS for above * test/webrick/test_httpresponse.rb: Tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e