diff options
author | Jim Herzberg <jimmiesh@gmail.com> | 2011-10-11 17:46:24 -0700 |
---|---|---|
committer | Jim Herzberg <jimmiesh@gmail.com> | 2011-10-11 17:46:24 -0700 |
commit | a78a75d67a8072bc7613edbed548d4b865daadf8 (patch) | |
tree | a1500200adbf85a4fc291a9261ec35a2c997ce9a /activeresource/lib/active_resource/connection.rb | |
parent | fa79408a559d250c59ab4dac34dc7e68e6b7533f (diff) | |
download | rails-a78a75d67a8072bc7613edbed548d4b865daadf8.tar.gz rails-a78a75d67a8072bc7613edbed548d4b865daadf8.tar.bz2 rails-a78a75d67a8072bc7613edbed548d4b865daadf8.zip |
activeresource should treat HTTP status 307 as redirection, same as 301 and 302; added missing test cases for statii 301 and 302.
Diffstat (limited to 'activeresource/lib/active_resource/connection.rb')
-rw-r--r-- | activeresource/lib/active_resource/connection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb index 592fca96a4..73410c2d82 100644 --- a/activeresource/lib/active_resource/connection.rb +++ b/activeresource/lib/active_resource/connection.rb @@ -122,7 +122,7 @@ module ActiveResource # Handles response and error codes from the remote service. def handle_response(response) case response.code.to_i - when 301,302 + when 301,302,307 raise(Redirection.new(response)) when 200...400 response |