diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-27 20:38:08 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-27 20:38:08 +0000 |
commit | d44ce1cb73ec9671ee4459ac76171ef32198554e (patch) | |
tree | be5f8f5fe71f89bc19659aa09cb576acfe3fd05b /actionpack/lib/action_controller | |
parent | 88f951a519d750236cc157566ef10f3977c933e1 (diff) | |
download | rails-d44ce1cb73ec9671ee4459ac76171ef32198554e.tar.gz rails-d44ce1cb73ec9671ee4459ac76171ef32198554e.tar.bz2 rails-d44ce1cb73ec9671ee4459ac76171ef32198554e.zip |
Integration tests: get_ and post_via_redirect take a headers hash. Closes #9130.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/integration.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb index 26f6126120..d8a310e0ba 100644 --- a/actionpack/lib/action_controller/integration.rb +++ b/actionpack/lib/action_controller/integration.rb @@ -124,17 +124,18 @@ module ActionController # Performs a GET request, following any subsequent redirect. Note that # the redirects are followed until the response is not a redirect--this # means you may run into an infinite loop if your redirect loops back to - # itself. - def get_via_redirect(path, args={}) - get path, args + # itself. Headers are treated in the same way as #get. + def get_via_redirect(path, args={}, headers = {}) + get path, args, headers follow_redirect! while redirect? status end # Performs a POST request, following any subsequent redirect. This is - # vulnerable to infinite loops, the same as #get_via_redirect. - def post_via_redirect(path, args={}) - post path, args + # vulnerable to infinite loops, the same as #get_via_redirect. Headers are + # treated in the same way as #get. + def post_via_redirect(path, args={}, headers = {}) + post path, args, headers follow_redirect! while redirect? status end |