redirect_to_directory_uri(req, res)
private
Redirects to a path ending in /
Show source
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.bytesize > 0
location << "?" << req.query_string
end
res.set_redirect(HTTPStatus::MovedPermanently, location)
end
end