提交 12d740dd 编写于 作者: J Jeremy Kemper

Move #query_string to AbstractRequest

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7727 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 3dc62ab8
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册