Skip to content
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>
(cherry picked from commit 68a13ed)
  • Loading branch information...
1 parent 586b284 commit 94a780356cd2ea6c7cb1ce75525596b28857870b @dmajda dmajda committed with pixeltrix 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 94a7803

Please sign in to comment.
Something went wrong with that request. Please try again.