aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorScott Barron <scott@elitists.net>2005-10-30 13:13:02 +0000
committerScott Barron <scott@elitists.net>2005-10-30 13:13:02 +0000
commit025949102edb5f31219f053bbab07b3c2b9a555a (patch)
tree565cc8c7ec457d87931b5e19764815ddf9fb1c25 /actionpack
parent5500d13dd5260c95a97208c4a617ed5391d4f799 (diff)
downloadrails-025949102edb5f31219f053bbab07b3c2b9a555a.tar.gz
rails-025949102edb5f31219f053bbab07b3c2b9a555a.tar.bz2
rails-025949102edb5f31219f053bbab07b3c2b9a555a.zip
Fix problem where redirecting components can cause an
infinite loop [Rick Olson] Closes #2654 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2829 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG2
-rwxr-xr-xactionpack/lib/action_controller/base.rb1
-rw-r--r--actionpack/test/controller/components_test.rb5
3 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index f9611126bf..15e60ba276 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fix problem where redirecting components can cause an infinite loop [Rick Olson]
+
* Added support for the queue option on visual_effect [Thomas Fuchs]
* Update script.aculo.us to V1.5_rc4 [Thomas Fuchs]
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 334dc1b4d5..fa047e18c2 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -805,6 +805,7 @@ module ActionController #:nodoc:
raise "You must assign a template class through ActionController.template_class= before processing a request" unless @@template_class
response.template = self.class.view_class.new(self.class.view_root, {}, self)
+ response.redirected_to = nil
@performed_render = @performed_redirect = false
end
diff --git a/actionpack/test/controller/components_test.rb b/actionpack/test/controller/components_test.rb
index de7e8f7260..d10f7102c2 100644
--- a/actionpack/test/controller/components_test.rb
+++ b/actionpack/test/controller/components_test.rb
@@ -116,6 +116,11 @@ class ComponentsTest < Test::Unit::TestCase
assert_redirected_to :action => "being_called"
end
+ def test_component_multiple_redirect_redirects
+ test_component_redirect_redirects
+ test_internal_calling
+ end
+
def test_component_as_string_redirect_renders_redirecte_action
get :calling_redirected_as_string