1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/webrick
normal aac91cb762 webrick: compile RE correctly for beginning and end match
Using ^ and $ in regexps means we can accidentally get fooled
by "%0a" in HTTP request paths being decoded to newline
characters.  Use \A and \z to match beginning and end-of-string
respectively, instead.

Thanks to mame and hsbt for reporting.

* lib/webrick/httpserver.rb (MountTable#compile):
  use \A and \z instead of ^ and $
* lib/webrick/httpserver.rb (MountTable#normalize): use \z instead of $
* test/webrick/test_httpserver.rb (test_cntrl_in_path): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13 00:38:08 +00:00
..
.htaccess
test_cgi.rb
test_config.rb Delay Utils.getservername until needed. 2016-12-07 12:59:48 +00:00
test_cookie.rb * lib/cgi/cookie.rb (parse): don't allow , as a separator. [Bug #12791] 2016-09-27 03:17:47 +00:00
test_do_not_reverse_lookup.rb
test_filehandler.rb
test_htmlutils.rb
test_httpauth.rb lib/webrick/log.rb: sanitize any type of logs 2017-09-14 11:16:23 +00:00
test_httpproxy.rb webrick: don't use OpenSSL::TestUtils from webrick tests 2016-11-29 15:48:47 +00:00
test_httprequest.rb
test_httpresponse.rb webrick: support Proc objects as body responses 2017-10-30 23:56:44 +00:00
test_https.rb webrick: fix SNI support 2017-07-18 01:59:28 +00:00
test_httpserver.rb webrick: compile RE correctly for beginning and end match 2017-12-13 00:38:08 +00:00
test_httputils.rb
test_httpversion.rb
test_server.rb
test_ssl_server.rb webrick: do not hang acceptor on slow TLS connections 2017-10-12 18:50:07 +00:00
test_utils.rb Fix a typo. 2017-09-13 02:21:02 +00:00
utils.rb Import gemspec 2017-04-25 09:23:04 +00:00
webrick.cgi
webrick_long_filename.cgi