aboutsummaryrefslogtreecommitdiffstats
path: root/lib/webrick
Commit message (Collapse)AuthorAgeFilesLines
...
* * lib/webrick/httpservlet/filehandler.rb (set_dir_list): use TABLE.nobu2013-05-201-10/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpservlet/filehandler.rb (set_dir_list): set charset.nobu2013-05-201-1/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpservlet/filehandler.rb (set_dir_list): share title and h1.nobu2013-05-201-2/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* webrick: fix non-ascii escape bugsnobu2013-05-202-4/+15
| | | | | | | | | * 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
* filehandler.rb: revert r20152nobu2013-05-201-4/+2
| | | | | | | * 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
* fix typos inspired by r40825kazu2013-05-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpauth/htpasswd.rb: Use Tempfile.create to avoidakr2013-04-202-6/+12
| | | | | | | | 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
* * lib/webrick/httpproxy.rb: Fix typos in HTTPProxyServer [Bug #8013]zzak2013-03-081-4/+4
| | | | | | | Patch by Nobuhiro IMAI [ruby-core:53127] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/utils.rb: use Socket.tcp_server_sockets to create serverakr2013-03-021-19/+4
| | | | | | | | | 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
* * remove trailing spaces.nobu2013-01-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/accesslog.rb: Improved WEBrick documentation.drbrain2013-01-2622-83/+812
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/httpservlet/abstract.rb (WEBrick::HTTPServlet): Typo inzzak2013-01-051-1/+1
| | | | | | | example. Patch by shlensky [Fixes #232 on github] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typo of r36878naruse2012-09-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/ssl.rb (WEBrick::Config::SSL): add new keynaruse2012-09-011-0/+2
| | | | | | | | | SSLTmpDhCallback to set SSLContext#tmp_dh_calback. * lib/webrick/ssl.rb (WEBrick::GenericServer#setup_ssl_context): follow above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove trainling spaces.nobu2012-08-211-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTPknu2012-06-131-0/+6
| | | | | | | | | | | | | | | | response codes added in RFCs 2817 and 4918. [ruby-core:45547] [Feature #6569] * lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to Net::HTTPMultipleChoices, leaving the former as alias to the latter for backward compatibitily. [ruby-core:45547] [Feature #6569] * lib/net/http/responses.rb: Add comments about unused, still-in-draft and private extension response codes. [ruby-core:45547] [Feature #6569] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/responses.rb: Add RFC 6586 response codes. Patch bydrbrain2012-06-081-1/+5
| | | | | | | | | | Sangil Jung. [ruby-trunk - Feature #6480] * lib/net/http/response.rb: ditto * lib/net/http.rb: ditto * lib/webrick/httpstatus.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/server.rb (WEBrick::GenericServer#start):naruse2012-04-141-4/+4
| | | | | | | | | | partially revert r35315. * test/webrick/test_server.rb (test_start_exception): received signal is delivered to the main thread, so it is needed to emulate it. patched by Eric Hodel. [ruby-core:44348] [Feature #6236] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/server.rb (WEBrick::GenericServer#stop): fix r35303;naruse2012-04-131-5/+6
| | | | | | | | | this method is to deny new connections, not shutdown yet. * lib/webrick/server.rb (WEBrick::GenericServer#start): re-raise exception only when the exception is Interrupt (^C). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/server.rb (module WEBrick::GenericServer): A serverdrbrain2012-04-111-28/+62
| | | | | | | | | | | | | 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
* * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): get keysnaruse2012-04-071-1/+3
| | | | | | | and fetch values from it to prevent @timeout_info's error "can't add a new key into hash during iteration". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):naruse2012-04-071-7/+12
| | | | | | | | use readpartial to get data even if the response is streaming data and each data is smaller than @buffer_size. patched by yu nobuoka. [ruby-dev:45471] [Bug #6230] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/server.rb (WEBrick::GenericServer): close socket only ifnaruse2012-04-011-1/+1
| | | | | | the socket is not closed yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): dup to preventnaruse2012-03-311-1/+1
| | | | | | @timeout_info's "can't add a new key into hash during iteration". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick.rb: Moved proxy rewriting to WEBrick::HTTPProxy.drbrain2012-02-021-1/+29
| | | | | | | | * lib/webrick/httpproxy.rb: Add examples of creating a proxy server and response rewriting using HTTPProxy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpresponse.rb (setup_header): 1xx responsestenderlove2011-12-121-1/+1
| | | | | | | | are allowed to have Keep-Alive connections. * test/webrick/test_httpresponse.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpresponse.rb (setup_header): 204 and 304 responsestenderlove2011-12-121-1/+1
| | | | | | | | are allowed to have a Keep-Alive connection. [ruby-core:41581] * test/webrick/test_httpresponse.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/utils.rb: fix fcntl call.akr2011-11-011-1/+1
| | | | | | | | * lib/drb/unix.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httputils.rb: Add MIME Type definition of .js and .svg.naruse2011-09-261-0/+2
| | | | | | patched by Hal Brodigan. [ruby-core:39704] [Bug #5365] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#each):naruse2011-07-211-4/+6
| | | | | | | Allow HTTP/0.9 request which doesn't has any header or body. patched by Felix Jodoin. [ruby-core:38040] [Bug #5022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpauth/digestauth.rb (_authenticate):naruse2011-07-051-5/+2
| | | | | | | | | | | | Literal texts in HTTP ABNF is case-insensitive (RFC2616 2.1), and a ample implementation in RFC2617 also ignores the case of algorithms. So now this ignores those cases. [ruby-dev:43965] [Feature #4936] * lib/webrick/httpauth/digestauth.rb (initialize): Because of above, opera_hack is useless and removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httprequest.rb (setup_forwarded_info): Parsing request nahi2011-06-241-1/+9
| | | | | | | | | | | | | header failed when the request is from 2 or more Apache reverse proxies. It's said that all X-Forwarded-* headers will contain more than one (comma-separated) value if the original request already contained one of these headers. Since we could use these values as Host header, we choose the initial(first) value. See #4922. * test/webrick/test_httprequest.rb (test_forwarded): Test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/accesslog.rb: Cosmetic fix of mismatched indentation.nahi2011-06-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpresponse.rb (HTTPResponse#setup_header): Close nahi2011-06-211-0/+5
| | | | | | | | | | HTTP/1.1 connection when returning an IO object as response body without setting HTTPResponse#chunked to true. See #855 no.1. * test/webrick/test_httpserver.rb: Test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/cookie.rb (WEBrick::Cookie.parse): Revert r31228. nahi2011-06-201-1/+1
| | | | | | | | | | | | r31228 was for allowing the 'Cookie:' header which did not have no SP after ';' for separating cookie-pairs but RFC6265 requires single SP after ';' there. We allow multiple SPs here for compatibility with older WEBrick version. * test/webrick/test_cookie.rb: Test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/log.rb: Improve documentation of BasicLog and Log.drbrain2011-06-162-7/+93
| | | | | | | | | | Patch by Olivier Brisse. [Ruby 1.9 - Bug #4833] * lib/webrick/httpstatus.rb: Improve documentation of WEBrick::HTTPStatus. Patch by Olivier Brisse. [Ruby 1.9 - Bug #4833] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/utils.rb: Document WEBrick::Utils. Patch by Olivierdrbrain2011-06-161-1/+67
| | | | | | | Brisse. [Ruby 1.9 - Bug #4819] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpservlet/erbhandler.rb: Allow the ERB document todrbrain2011-06-161-1/+1
| | | | | | | alter the content-type of the response. [Ruby 1.9 - Bug #4685] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/https.rb (WEBrick::HTTPRequest#parse_uri):naruse2011-05-291-0/+1
| | | | | | keep parse_uri as private. patched by okkez. [Bug #4773] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/compat.rb: Improve documentation. Patch by Sandordrbrain2011-05-171-0/+20
| | | | | | | Szücs. [Ruby 1.9 - Bug #4725] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2011-05-151-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpservlet/erbhandler.rb: Add documentation.drbrain2011-05-121-0/+33
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: fix a typo.nagachika2011-05-111-1/+1
| | | | | | | | * lib/logger.rb: ditto * lib/rss.rb: ditto * lib/webrick/httpauth/authenticator.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick: Add documentation for WEBrick::HTTPAuthdrbrain2011-05-108-17/+275
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick: Add Documentationdrbrain2011-05-1010-16/+393
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/log.rb: Hide copyright info from ridrbrain2011-05-098-8/+8
| | | | | | | | | | | | | * lib/webrick/httpstatus.rb: ditto * lib/webrick/htmlutils.rb: ditto * lib/webrick/httpversion.rb: ditto * lib/webrick/version.rb: ditto * lib/webrick/httpauth/userdb.rb: ditto * lib/webrick/httpauth/authenticator.rb: ditto * lib/webrick/accesslog.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fri Apr 1 18:53:06 2011 NAKAMURA, Hiroshi <nahi@ruby-lang.org>nahi2011-04-011-1/+1
| | | | | | | | | | | | | * lib/webrick/cookie.rb (WEBrick::Cookie.parse): 'white space is permitted between tokens' according to RFC2965. Though 'Netscape spec' does not define the syntax clearly, make it tolerant as a server. As a real-world example, rest-client gem sends 'Cookie: foo=1;bar=2' * test/webrick/test_cookie.rb (test_parse_non_whitespace): test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/accesslog.rb (WEBrick::AccessLog#format): supportakr2010-12-091-0/+7
| | | | | | | | %{remote}p for logging remote (client) port number. [ruby-dev:42670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/*.rb: Remove unused variable warnings.marcandre2010-11-085-7/+6
| | | | | | Patch by Run Paint [ruby-core:30991] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httprequest.rb (read_request_line): extend maxnaruse2010-10-281-2/+4
| | | | | | | length to 2083. This is from Internet Explorer's max uri length. http://support.microsoft.com/kb/208427 [ruby-core:32924] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e