diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-15 00:51:02 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-15 00:51:02 +0000 |
commit | c844755e5a0c3d4edfcc78f9c30ef91fa0de550a (patch) | |
tree | 4cf4890fc5af5f58dd0a6a19c0a6fea6ed39a1df /actionpack/lib/action_controller/cgi_process.rb | |
parent | a3298e5efdf33398b49933323ea3fef7ff4e9a9c (diff) | |
download | rails-c844755e5a0c3d4edfcc78f9c30ef91fa0de550a.tar.gz rails-c844755e5a0c3d4edfcc78f9c30ef91fa0de550a.tar.bz2 rails-c844755e5a0c3d4edfcc78f9c30ef91fa0de550a.zip |
Merged back the Routing branch
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@614 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/cgi_process.rb')
-rw-r--r-- | actionpack/lib/action_controller/cgi_process.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb index 92b19fbf18..c301b322e5 100644 --- a/actionpack/lib/action_controller/cgi_process.rb +++ b/actionpack/lib/action_controller/cgi_process.rb @@ -46,8 +46,16 @@ module ActionController #:nodoc: super() end + def query_string + return @cgi.query_string unless @cgi.query_string.nil? || @cgi.query_string.empty? + parts = env['REQUEST_URI'].split('?') + parts.shift + return parts.join('?') + end + def query_parameters - @cgi.query_string ? CGIMethods.parse_query_parameters(@cgi.query_string) : {} + qs = self.query_string + qs.empty? ? {} : CGIMethods.parse_query_parameters(query_string) end def request_parameters |