In certain cases, I want to send a 302 redirect back to the same page. For example, if I have a random datastore error, I could redirect them to the same page, having them automatically retry.
I tested this in firefox and chrome and it works fine, I’m wondering if I’ll encounter problems in other browsers though.
You cannot expect this to work in general. The HTTP specification just says
but nothing about how it this must be done. It would be perfectly within the standard to detect at the first redirect that there’s a cycle and immediately error out.
(Also, since you’re the server, why not just do the retrying yourself?)