diff options
author | Tobias Lütke <tobias.luetke@gmail.com> | 2007-03-19 18:02:24 +0000 |
---|---|---|
committer | Tobias Lütke <tobias.luetke@gmail.com> | 2007-03-19 18:02:24 +0000 |
commit | f39fe3091fe17b2f8b7836af78e033d1c939a832 (patch) | |
tree | 9dda681c3d039747b3da87cb7c7a1d06ce2a2f54 /actionpack/lib | |
parent | b5e01f3e4a2a7e0d6ae496ccefb82a6b752b7ee6 (diff) | |
download | rails-f39fe3091fe17b2f8b7836af78e033d1c939a832.tar.gz rails-f39fe3091fe17b2f8b7836af78e033d1c939a832.tar.bz2 rails-f39fe3091fe17b2f8b7836af78e033d1c939a832.zip |
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
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb index cd80415f82..5279315023 100755 --- a/actionpack/lib/action_controller/request.rb +++ b/actionpack/lib/action_controller/request.rb @@ -209,7 +209,7 @@ module ActionController # 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}/, '') |