aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/response.rb')
-rwxr-xr-xactionpack/lib/action_controller/response.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb
index 227aa27cc5..746d6097be 100755
--- a/actionpack/lib/action_controller/response.rb
+++ b/actionpack/lib/action_controller/response.rb
@@ -8,7 +8,7 @@ module ActionController
end
def redirect(to_url, permanently = false)
- @headers["Status"] ||= "302 Found"
+ @headers["Status"] = "302 Found" unless @headers["Status"] == "301 Moved Permanently"
@headers["location"] = to_url
@body = "<html><body>You are being <a href=\"#{to_url}\">redirected</a>.</body></html>"