Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move #query_string to AbstractRequest

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7727 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 12d740dd57ba5949ba3f0a865285eb52530c86d5 1 parent 3dc62ab
@jeremy jeremy authored
View
4 actionpack/lib/action_controller/cgi_process.rb
@@ -55,10 +55,8 @@ def query_string
qs = @cgi.query_string if @cgi.respond_to?(:query_string)
if !qs.blank?
qs
- elsif uri = @env['REQUEST_URI']
- uri.split('?', 2)[1] || ''
else
- @env['QUERY_STRING'] || ''
+ super
end
end
View
9 actionpack/lib/action_controller/request.rb
@@ -205,6 +205,15 @@ def subdomains(tld_length = 1)
parts[0..-(tld_length+2)]
end
+ # Return the query string, accounting for server idiosyncracies.
+ def query_string
+ if uri = @env['REQUEST_URI']
+ uri.split('?', 2)[1] || ''
+ else
+ @env['QUERY_STRING'] || ''
+ end
+ end
+
# Return the request URI, accounting for server idiosyncracies.
# WEBrick includes the full URL. IIS leaves REQUEST_URI blank.
def request_uri
Please sign in to comment.
Something went wrong with that request. Please try again.