Permalink
Browse files

Added "short hypertext note with a hyperlink to the new URI(s)" to re…

…directs 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
  • Loading branch information...
1 parent 2e1a27f commit 60caf0e66172667400777674d09ade1032907076 @dhh dhh committed Dec 31, 2004
Showing with 4 additions and 0 deletions.
  1. +2 −0 actionpack/CHANGELOG
  2. +2 −0 actionpack/lib/action_controller/response.rb
View
2 actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* 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]
+
* Added second boolean parameter to Base.redirect_to_url and Response#redirect to control whether the redirect is permanent or not (301 vs 302) #375 [Hodel]
* Fixed that @request.remote_ip didn't work in the test environment #369 [Bruno Mattarollo]
View
2 actionpack/lib/action_controller/response.rb
@@ -10,6 +10,8 @@ def initialize
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

0 comments on commit 60caf0e

Please sign in to comment.