summaryrefslogtreecommitdiff
path: root/lib/webrick
AgeCommit message (Collapse)Author
2015-11-16* lib/webrick/httpauth/basicauth.rb: fix a typo.hsbt
[ci skip][fix GH-1099] Patch by @jwworth * lib/webrick/httpauth/digestauth.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-27* lib/webrick/server.rb: use IO::NULL instead of '/dev/null'hsbt
* test/ruby/test_string.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51709 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-14webrick/utils.rb: adaptive sleepnobu
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#initialize): make sleep intervals adaptive than fixed period intervals. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51234 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-13httpproxy.rb: fix typos [ci skip]nobu
* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#do_CONNECT): fix typos in debugger statements. [Fix GH-967] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17lib/webrick/utils.rb: simplify by avoiding fcntlnormal
IO#nonblock= and IO#close_on_exec= methods are simpler-to-use and potentially more portable to for future OSes. IO#nonblock= and IO#close_on_exec= are also smart enough to avoid redundantly setting flags so a syscall may be avoided. These methods could probably be removed entirely and inlined, but it's unclear if there is 3rd-party code which relies on them. * lib/webrick/utils.rb (set_non_blocking): use IO#nonblock= * (set_close_on_exec): use IO#close_on_exec= [Feature #11136] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17lib/webrick/server.rb: avoid redundant fcntl callnormal
Sockets are close-on-exec by default since Ruby 2.0, so it is redundant to set it again. * lib/webrick/server.rb (accept_client): avoid redundant fcntl call [Feature #11137] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-06stdlib: use IO#wait_*able instead of IO.select when possiblenormal
In case a process encounters high-numbered FDs, this allows consistent performance on systems with ppoll support. [ruby-core:35572] * ext/socket/lib/socket.rb (connect_nonblock): use IO#wait_writable * lib/drb/drb.rb (DRB::DRbTCPSocket#alive?): use IO#wait_readable * lib/webrick/httpserver.rb (run): ditto * lib/resolv.rb (request): ditto for single socket case [ruby-core:68943] [Feature #11081] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50432 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-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-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-10* lib/webrick/server.rb: Less instance variables.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10* lib/webrick/server.rb (shutdown): Use close() on @shutdown_pipe_w toakr
notify readability on the read side of the pipe. write_nonblock() is not usable for pipe on Windows. (cleanup_shutdown_pipe): Rescue IOError for @shutdown_pipe_w.close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48354 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* lib/webrick/httpstatus.rb: require webrick/accesslog for AccessLog.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-05* lib/webrick/server.rb: Stop lisntner loop properly.akr
[ruby-core:66085] [Bug #10478] Fixed by Charles Nutter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07normalize reference to Timeout::Errornormal
From: John Bachir <j@jjb.cc> * bootstraptest/test_io.rb (assert_finish): normalize rescue for Timeout::Error * lib/net/ftp.rb (Net#read_timeout): ditto for doc * lib/resolv.rb (Resolv::ResolvTimeout): ditto for subclass * lib/webrick/httprequest.rb (_read_data): ditto for rescue * sample/timeout.rb (p timeout): ditto for call * test/drb/drbtest.rb (test_06_timeout): ditto * test/ruby/test_readpartial.rb (test_open_pipe): ditto * test/thread/test_queue.rb (test_queue_thread_raise): ditto * thread.c (rb_thread_s_handle_interrupt): ditto for doc [ruby-core:65481] [misc #10339] TimeoutError is a legacy constant, Timeout::Error is the canonical constant. This patch normalizes all code and comments to reference Timeout::Error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-08* lib/webrick/httpproxy.rb: remove needless conditionhsbt
for old ruby version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-02webrick/utils.rb: mark by class namenobu
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler::Thread): use particular class to mark by the class name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28* lib/webrick/utils.rb (create_listeners): Close socket objects.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26* lib/webrick/httpproxy.rb: remvoe useless assigned variables.hsbt
* lib/webrick/httpservlet/cgihandler.rb: ditto. * lib/webrick/httpservlet/erbhandler.rb: ditto. * lib/webrick/server.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-24* lib/gserver.rb: remove redundant use of to_s in interpolation.hsbt
* lib/logger.rb: ditto. * lib/optparse.rb: ditto. * lib/rbconfig/obsolete.rb: ditto. * lib/resolv.rb: ditto. * lib/webrick/httpresponse.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46543 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-25* lib/webrick/utils.rb: Override the inspect method of the threadakr
used in WEBrick::Utils::TimeoutHandler. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46109 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-04-25* lib/webrick/utils.rb: Don't rescue LoadError for 'etc' extension.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-24* lib/fileutils.rb (fu_get_uid, fu_get_gid): Etc.getpwnam/getgrnam mayusa
returns nil. * lib/webrick/utils.rb (su): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-12httpservlet/filehandler.rb: pass queriesnobu
* lib/webrick/httpservlet/filehandler.rb (set_dir_list): pass the given queries to subdirectories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25* lib/webrick/ssl.rb: [DOC] Fix typoa_matsuda
s/willbe/will be/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11* ext/win32ole/sample/olegen.rb: Fix typoa_matsuda
* ext/openssl/ossl_asn1.c: [DOC] Fix typo * lib/webrick/accesslog.rb: ditto * template/yarvarch.ja: ditto s/recieve/receive/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06* lib/webrick/httpstatus.rb: [DOC] Fix typoa_matsuda
s/sucess/success/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 * lib/webrick/compat.rb, lib/xmlrpc/datetime.rb: [DOC] fix typo by ↵hsbt
@vipulnsward [fix GH-464] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 * lib/webrick/httprequest.rb: [DOC] Fix broken link of CGI specification ↵hsbt
by @udzura [fix GH-466] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05* lib/webrick/httpresponse.rb: [DOC] Fix typoa_matsuda
s/resopnse/response/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04* lib/webrick/httpproxy.rb: [DOC] Fix typoa_matsuda
s/bacause/because/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29* lib/webrick/httpauth/digestauth.rb: Fix typo in an error message.a_matsuda
* test/ruby/test_parse.rb: Fix typo in a test name. s/allowd/allowed/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43917 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
2013-05-20* lib/webrick/httpservlet/filehandler.rb (set_dir_list): add NameWidth option.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-20* lib/webrick/httpservlet/filehandler.rb (set_dir_list): use TABLE.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-20* lib/webrick/httpservlet/filehandler.rb (set_dir_list): set charset.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-20* lib/webrick/httpservlet/filehandler.rb (set_dir_list): share title and h1.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-20webrick: fix non-ascii escape bugsnobu
* lib/webrick/htmlutils.rb (WEBrick::HTMLUtils#escape): replace HTML meta chars even in non-ascii string. [Bug #8425] [ruby-core:55052] * lib/webrick/httputils.rb (WEBrick::HTTPUtils#{_escape,_unescape}): fix %-escape encodings. [Bug #8425] [ruby-core:55052] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-20filehandler.rb: revert r20152nobu
* lib/webrick/httpservlet/filehandler.rb (set_dir_list): revert r20152 partially and fix misuse of bytesize and regexp repetition operator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19fix typos inspired by r40825kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-20* lib/webrick/httpauth/htpasswd.rb: Use Tempfile.create to avoidakr
unintentional unlink() by the finalizer. lib/webrick/httpauth/htdigest.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-08* lib/webrick/httpproxy.rb: Fix typos in HTTPProxyServer [Bug #8013]zzak
Patch by Nobuhiro IMAI [ruby-core:53127] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-02* lib/webrick/utils.rb: use Socket.tcp_server_sockets to create serverakr
sockets. fix [Bug #7100] https://bugs.ruby-lang.org/issues/7100 reported by sho-h (Sho Hashimoto). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-26* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e