aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-31 17:07:20 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-31 17:07:20 +0000
commit60caf0e66172667400777674d09ade1032907076 (patch)
treea9c78a695653883a7792d0ae73fde1d6d78549bd /actionpack/lib/action_controller
parent2e1a27fa4de4460808405bdb7771ae2c59b99dd1 (diff)
downloadrails-60caf0e66172667400777674d09ade1032907076.tar.gz
rails-60caf0e66172667400777674d09ade1032907076.tar.bz2
rails-60caf0e66172667400777674d09ade1032907076.zip
Added "short hypertext note with a hyperlink to the new URI(s)" to redirects to fulfill compliance with RFC 2616 (HTTP/1.1) section 10.3.3 #397 [Tim Bates]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@294 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-xactionpack/lib/action_controller/response.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb
index a574fbca75..2e6c5fcc37 100755
--- a/actionpack/lib/action_controller/response.rb
+++ b/actionpack/lib/action_controller/response.rb
@@ -10,6 +10,8 @@ module ActionController
def redirect(to_url, permanently = false)
@headers["Status"] = permanently ? "301 Moved Permanently" : "302 Found"
@headers["location"] = to_url
+
+ @body = "<html><body>You are being <a href=\"#{to_url}\">redirected</a>.</body></html>"
end
end
end \ No newline at end of file