summaryrefslogtreecommitdiff
path: root/test/webrick
AgeCommit message (Collapse)Author
2012-10-12test_cgi.rb: skip a test on Windowsshirosaki
* test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): skip a test depending on locale on Windows. ENV[] doesn't work properly if console code page is not equal to file system encoding. [ruby-core:47910] [Bug #7140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14* lib/webrick/server.rb (WEBrick::GenericServer#start):naruse
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
2012-04-13* lib/webrick/server.rb (WEBrick::GenericServer#stop): fix r35303;naruse
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
2012-04-11* lib/webrick/server.rb (module WEBrick::GenericServer): A serverdrbrain
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
2012-04-07* Remove unused variables.naruse
* use Thread.pass instead of true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07* lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):naruse
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
2011-12-12* lib/webrick/httpresponse.rb (setup_header): 1xx responsestenderlove
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
2011-12-12* lib/webrick/httpresponse.rb (setup_header): 204 and 304 responsestenderlove
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
2011-11-16* test/webrick/test_cgi.rb (TestWEBrickCGI#start_cgi_server): there areusa
no guarantee of existance of RbConfig::CONFIG['LIBPATHENV']. it only exists in Unix-like environments. * test/webrick/test_filehandler.rb (WEBrick::TestFileHandler#test_script_disclosure): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-12* test/webrick/test_cgi.rb (class TestWEBrickCGI): respectkosaki
RbConfig::CONFIG["LIBPATHENV"]. [Bug #5135] [ruby-core:38653] * test/webrick/test_filehandler.rb (class WEBrick): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-21* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#each):naruse
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
2011-07-05Remove debug print of r32410.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-05* lib/webrick/httpauth/digestauth.rb (_authenticate):naruse
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
2011-06-24* lib/webrick/httprequest.rb (setup_forwarded_info): Parsing request nahi
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
2011-06-21* lib/webrick/httpresponse.rb (HTTPResponse#setup_header): Close nahi
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
2011-06-20* lib/webrick/cookie.rb (WEBrick::Cookie.parse): Revert r31228. nahi
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
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-01Fri Apr 1 18:53:06 2011 NAKAMURA, Hiroshi <nahi@ruby-lang.org>nahi
* 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
2011-03-29* test/webrick/test_filehandler.rbusa
(WEBrick::TestFileHandler#test_short_filename): the cgi doesn't exist on current directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-28* test/webrick/test_filehandler.rb (test_short_filename):arton
read real short filename by cmd because smb mounted files have different naming convention. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-20* test/webrick/utils.rb (TestWEBrick::RubyBin): test CGI does not needusa
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
2011-01-14Reduced gem_prelude to just require rubygems. Reviewed by Evan Phoenixryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-12Simple fix for emacs parsing. (emacs doesn't like _heredocs_)ryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-12* test/webrick/test_cgi.rb: Removes usage of deprecatednaruse
:RequestHandler option. patched by Peter Weldon [ruby-core:34010] * test/webrick/test_httpproxy.rb: ditto. * test/webrick/test_httpserver.rb: Add a test of the deprecation behaviour. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-28Fix test for r29617.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-01 * test/webrick/test_httpproxy.rb (TestWEBrickHTTPProxy::test_upstream_proxy):shyouhei
My machine fails this test at this line, saying 503 service unavailable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-10 * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#continue): addnahi
method for generating HTTP/1.1 100 continue response if the client expects it, otherwise does nothing. Patch by Brian Candler. ref #855. * test/webrick/test_httprequest.rb: test added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-07don't sleep indefinitely. collect the zombie.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-07Revert r26058 "* test/webrick/test_server.rb (test_daemon): simply use ↵naruse
fork's return" This must use pipe because the target for kill is not direct child. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-02use require_relative.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25supress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18* lib/webrick/httpservlet/filehandler.rb (make_partial_content):nobu
add bytes-unit. [ruby-dev:40030] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18* test/webrick/test_cgi.rb: require util.rb first to override thenobu
executable name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12* test/ruby/envutil.rb (EnvUtil#rubybin): fake also rbconfig.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-10 * lib/webrick/accesslog.rb : Escape needed.shyouhei
* lib/webrick/httpstatus.rb : ditto. * lib/webrick/httprequest.rb : ditto. * lib/webrick/httputils.rb : ditto. * test/webrick/test_cgi.rb (TestWEBrickCGI::test_bad_): Test for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-10* test/webrick/test_server.rb (test_daemon): simply use fork's returnnaruse
value, don't use pipe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12* test: use require_relative.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* test/webrick/utils.rb (start_server): provide a reference to log ofmame
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
2008-09-24* test: assert_raises has been deprecated since a long time ago.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-17* lib/webrick/cgi.rb (WEBrick::CGI::Socket#eof?): added lacked method.gotoyuzo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-18test material for r16453.gotoyuzo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-18* lib/webrick/httpservlet/filehandler.rb: should normalize pathgotoyuzo
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
2008-03-03* lib/webrick/httpservlet/filehandler.rb: should normalize pathgotoyuzo
separators in path_info to prevent directory traversal attacks on DOSISH platforms. reported by Digital Security Research Group [DSECRG-08-026]. * lib/webrick/httpservlet/filehandler.rb: pathnames which have not to be published should be checked case-insensitively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09* lib/webrick/httprequest.rb: supprt X-Forwarded-* header fields.gotoyuzo
WEBrick::HTTPRequest#{host,port,request_uri} is derived having regards to X-Forwarded-Proto and X-Forwarded-Host. * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#server_name?): new method. (WEBrick::HTTPRequest#remote_ip?): new method. (WEBrick::HTTPRequest#ssl?): new method. * string.c (rb_enc_cr_str_buf_cat): fix self appending. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-31* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service):gotoyuzo
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
2007-12-17* lib/webrick/httprequest.rb, lib/webrick/cgi.rb: Request-Line orgotoyuzo
header fields shold be read with maximum length. [ruby-talk:231745] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-02* lib/xmlrpc/create.rb (XMLRPC::Create::conv2value): Symbol shouldmatz
come earlier than String. * lib/soap/mapping/rubytypeFactory.rb (RubytypeFactory::obj2soap): ditto. * lib/set.rb (TC_Set::test_s_new): strings are no longer Enumerable * lib/soap/property.rb (Property::load): ditto. * lib/webrick/httputils.rb (WEBrick::HTTPUtils::parse_header): ditto. * lib/soap/mimemessage.rb (MIMEMessage::Headers::parse): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-08* lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookies): newgotoyuzo
method to parse multiple cookies per Set-Cookie header. Thanks to Aaron Patterson <aaron_patterson at speakeasy.net>. [ruby-core:08802] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-31* lib/webrick/httprequest.rb (WEBrick::HTTPReuqest#parse_uri): improvegotoyuzo
for the value of IPv6 address in the Host: header field. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e