rails/rails — Issue #4144: Use 303 for redirects instead of 302?
Author: mahemoff
Created: 2011-12-23 10:22:49+00:00
State: open

I recently discovered a change in Chrome which makes 303 more desirable than 302 for redirects. It turns out Chrome will automatically redirect GET and POSTs, *but will not redirect* for any other methods. This is correct behaviour according to the HTTP spec - Wikipedia says 302 is "an example of industrial practice contradicting the standard". [2] It's particularly confusing because other browsers presently do redirect for all 302s (tested on recent Firefox and Opera).

So I'm wondering whether the default status for redirects should be 303 instead of 302. Or at least a config option.

1. http://code.google.com/p/chromium/issues/detail?id=107159#c1
2. http://en.wikipedia.org/wiki/List_of_HTTP_status_codes