aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Majda <dmajda@suse.cz>2011-08-23 14:12:41 +0200
committerAndrew White <andyw@pixeltrix.co.uk>2011-08-23 15:34:11 +0100
commit68a13eded347248fb9d4c8ef7f0ed2af52bba994 (patch)
treea634af9679a62b88dfca7568830b957fc0f90eef /actionpack
parentebea387e4bb9f44d8c678ed9bad2ab2091d1f9c6 (diff)
downloadrails-68a13eded347248fb9d4c8ef7f0ed2af52bba994.tar.gz
rails-68a13eded347248fb9d4c8ef7f0ed2af52bba994.tar.bz2
rails-68a13eded347248fb9d4c8ef7f0ed2af52bba994.zip
Make ActionController::TestCase#recycle! set @protocol to nil
This ensures that the protocol does not get carried over when there are two or more requests in functional tests. This was a problem when e.g. the first request was HTTP and the second request was HTTPS. Closes #2654. Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/test_case.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index a38e5a46da..40332da321 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -180,7 +180,7 @@ module ActionController
@env.delete_if { |k, v| k =~ /^action_dispatch\.rescue/ }
@symbolized_path_params = nil
@method = @request_method = nil
- @fullpath = @ip = @remote_ip = nil
+ @fullpath = @ip = @remote_ip = @protocol = nil
@env['action_dispatch.request.query_parameters'] = {}
@set_cookies ||= {}
@set_cookies.update(Hash[cookie_jar.instance_variable_get("@set_cookies").map{ |k,o| [k,o[:value]] }])