提交 f39fe309 编写于 作者: T Tobias Lütke

Fix nil error for requests with empty PATH_INFO header such as those which are...

Fix nil error for requests with empty PATH_INFO header such as those which are send by the ScanAlert spider


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6451 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 b5e01f3e
......@@ -209,7 +209,7 @@ def request_uri
# Returns the interpreted path to requested resource after all the installation directory of this application was taken into account
def path
path = (uri = request_uri) ? uri.split('?').first : ''
path = (uri = request_uri) ? uri.split('?').first.to_s : ''
# Cut off the path to the installation directory if given
path.sub!(%r/^#{relative_url_root}/, '')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册