mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#do_CONNECT):
use #bytesize instead of #size. a patch submitted from raspberry lemon in [ruby-core:18571]. * lib/webrick/httpauth/digestauth.rb, lib/webrick/httpproxy.rb, lib/webrick/httprequest.rb, lib/webrick/httpservlet/cgi_runner.rb, lib/webrick/httpservlet/abstract.rb, lib/webrick/httpresponse.rb, lib/webrick/httpservlet/cgihandler.rb, lib/webrick/utils.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
75fcee4a23
commit
877ac7236a
10 changed files with 37 additions and 26 deletions
|
@ -59,7 +59,7 @@ module WEBrick
|
|||
def redirect_to_directory_uri(req, res)
|
||||
if req.path[-1] != ?/
|
||||
location = WEBrick::HTTPUtils.escape_path(req.path + "/")
|
||||
if req.query_string && req.query_string.size > 0
|
||||
if req.query_string && req.query_string.bytesize > 0
|
||||
location << "?" << req.query_string
|
||||
end
|
||||
res.set_redirect(HTTPStatus::MovedPermanently, location)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue