aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/cgi_process.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb
index edb7fb38d8..fa7afd4197 100644
--- a/actionpack/lib/action_controller/cgi_process.rb
+++ b/actionpack/lib/action_controller/cgi_process.rb
@@ -47,11 +47,11 @@ module ActionController #:nodoc:
end
def query_string
- qs = @cgi.query_string
+ qs = @cgi.query_string if @cgi.respond_to?(:query_string)
if !qs.blank?
qs
elsif uri = @env['REQUEST_URI']
- uri.split('?', 2).last
+ uri.split('?', 2)[1] || ''
else
@env['QUERY_STRING'] || ''
end