Permalink
Browse files

Fix that redirects should set "Location" header, not "location", and …

…remove dead CGI.redirect

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5634 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 2d1169a commit 093c7257326ea31a832c167f9049b02f897365bf @dhh dhh committed Nov 26, 2006
@@ -27,13 +27,6 @@ def query_parameters
def request_parameters
CGIMethods.parse_request_parameters(params, env_table)
end
-
- def redirect(where)
- header({
- "Status" => "302 Moved",
- "location" => "#{where}"
- })
- end
def session(parameters = nil)
parameters = {} if parameters.nil?
@@ -27,7 +27,7 @@ def charset
def redirect(to_url, permanently = false)
@headers["Status"] = "302 Found" unless @headers["Status"] == "301 Moved Permanently"
- @headers["location"] = to_url
+ @headers["Location"] = to_url
@body = "<html><body>You are being <a href=\"#{to_url}\">redirected</a>.</body></html>"
end

0 comments on commit 093c725

Please sign in to comment.