Browse files

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>
  • Loading branch information...
1 parent 257061d commit 621fe9816678cc526def0001cb107609c701b891 @dmajda dmajda committed with spastorino Aug 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/test_case.rb
View
2 actionpack/lib/action_controller/test_case.rb
@@ -184,7 +184,7 @@ def recycle!
@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'] = {}
end
end

0 comments on commit 621fe98

Please sign in to comment.