aboutsummaryrefslogtreecommitdiffstats
path: root/lib/webrick/httpserver.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
* stdlib: use IO#wait_*able instead of IO.select when possiblenormal2015-05-061-1/+2
| | | | | | | | | | | | | | 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
* webrick/httpserver.rb: Stop handling requests on shutdownnobu2014-05-081-2/+2
| | | | | | | | | | * 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
* * lib/webrick/accesslog.rb: Improved WEBrick documentation.drbrain2013-01-261-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/webrick/cgi.rb: ditto. * lib/webrick/config.rb: ditto. * lib/webrick/cookie.rb: ditto. * lib/webrick/httpauth/authenticator.rb: ditto. * lib/webrick/httpauth/basicauth.rb: ditto. * lib/webrick/httpauth/digestauth.rb: ditto. * lib/webrick/httpproxy.rb: ditto. * lib/webrick/httprequest.rb: ditto. * lib/webrick/httpresponse.rb: ditto. * lib/webrick/https.rb: ditto. * lib/webrick/httpserver.rb: ditto. * lib/webrick/httpservlet/cgihandler.rb: ditto. * lib/webrick/httpservlet/filehandler.rb: ditto. * lib/webrick/httpservlet/prochandler.rb: ditto. * lib/webrick/httputils.rb: ditto. * lib/webrick/httpversion.rb: ditto. * lib/webrick/log.rb: ditto. * lib/webrick/server.rb: ditto. * lib/webrick/ssl.rb: ditto. * lib/webrick/utils.rb: ditto. * lib/webrick/version.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick: Add Documentationdrbrain2011-05-101-0/+47
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {ext,lib,test}/**/*.rb: removed trailing spaces.nobu2009-03-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpserver.rb (WEBrick::HTTPServer::unmount): removematz2006-07-181-1/+1
| | | | | | | inpect argument from sprintf. [ruby-dev:29039] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpproxy.rb (HTTPProxyServer#intialize),gotoyuzo2005-08-071-1/+1
| | | | | | | | | | | | | | lib/webrick/httpserver.rb (HTTPServer#intialize), lib/webrick/httpservlet/cgihandler.rb (CGIHandler#initialize), lib/webrick/httpservlet/erbhandler.rb (ERBHandler#initialize), lib/webrick/httpservlet/filehandler.rb(DefaultFileHandler#initialize): super (called with no arguments) takes default value of optional arguments. [ruby-dev:26743] * lib/webrick/httputils.rb: add a media-type "text/html" for .xhtml. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): shouldgotoyuzo2005-05-311-1/+4
| | | | | | | | | | | break the loop if the socket reached to EOF. [ruby-talk:142285] * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): send response without reading the whole request body if keep-alive is diabled. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/cgi.rb (WEBrick::CGI#setup_header): avoidgotoyuzo2004-12-091-0/+7
| | | | | | | | | | SecurityError. [ruby-dev:24970] * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should wait for reading request till data arrive. [ruby-talk:121068] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpserver.rb (WEBrick::HTTPServer#virtual_host):gotoyuzo2004-03-211-2/+9
| | | | | | | | | | sort @virtual_hosts in address, port, host order. * lib/webrick/httpserver.rb (WEBrick::HTTPServer#lookup_server): hostname should not be match if :ServerAlias is not given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/config.rb (WEBrick::Config::HTTP): rename :RequestHandergotoyuzo2004-03-071-6/+12
| | | | | | | | | | | | | | | | | | | | to :RequestCallback and add new option :ServerAlias. * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): use :RequestCallback and warn if :RequestHandler is in server's option. * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should print error message for WEBrick::HTTPSataus::Error. * lib/webrick/httpserver.rb (WEBrick::HTTPServer#lookup_server): lookup for hostname from :ServerAlias if the req.host is not match to :ServerName. * lib/webrick/httpservlet.rb (WEBrick::HTTPServlet::CGIHandler#do_GET): use $?.exitstatus and refine log message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): supportgotoyuzo2004-01-241-3/+19
| | | | | | | | | | | | | virtual host. * lib/webrick/httpserver.rb (WEBrick::HTTPServer#virtual_host): add new method to register virtual hosting server. * lib/webrick/httpserver.rb (WEBrick::HTTPServer#lookup_server): add new method to lookup virtual hosting server. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpresponse.rb: add HTTPResponse#keep_alive=.gotoyuzo2003-11-251-0/+1
| | | | | | | | * lib/webrick/httpserver.rb (HTTPServer#run): should pass the request's keep_alive flag to the response. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpserver.rb (HTTPServer#access_log): add "\n" togotoyuzo2003-09-081-1/+1
| | | | | | | | | the message. * lib/webrick/log.rb (BasicLog#log): add "\n" only if needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/accesslog.rb (AccessLog::setup_params): use req.portgotoyuzo2003-09-081-5/+3
| | | | | | | | | | | | | | | | | | | | instead of config[:Port] or req.request_uri.port. * lib/webrick/httprequest.rb (HTTPRequest#meta_vars): ditto. * lib/webrick/httpservlet/filehandler.rb (FileHandler#dir_list): ditto. * lib/webrick/config.rb: :Listen option never be used. * lib/webrick/server.rb (GenericServer#initialize): don't use :Listen option and add warning message. * lib/webrick/log.rb (BasicLog#<<): shortcut of log(INFO, ...). * lib/webrick/httpserver.rb (HTTPServer#accesslog): use << for logging. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/ssl.rb: new file; SSL/TLS enhancement for GenericServer.gotoyuzo2003-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | * lib/webrick/https.rb: SSLSocket handling is moved to webrick/ssl.rb. * lib/webrick/compat.rb (File::fnmatch): remove old migration code. * lib/webrick/httpserver.rb (HTTPServer#run): ditto. * lib/webrick/server.rb (GenericServer#listen): the body of this method is pull out as Utils::create_lisnteners. * lib/webrick/utils.rb (Utils::create_lisnteners): new method. * lib/webrick/server.rb (GenericServer#start): should not through unknown errors. and refine comments. * ext/openssl/lib/openssl/ssl.rb (SSLServer#accept): should close socket if SSLSocket raises error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick: imported.gotoyuzo2003-07-231-0/+179
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e