[Catalyst] Redirect status codes (was: HTTP redirect - delayed Firefox)

Matt S Trout dbix-class at trout.me.uk
Mon Feb 12 10:34:56 GMT 2007


On 10 Feb 2007, at 08:30, A. Pagaltzis wrote:

> * John Napiorkowski <jjn1056 at yahoo.com> [2007-02-08 22:55]:
>> I believe that when redirecting as a result of a post that 303
>> is supposed to be correct, whereas 302 is used for redirects
>> when the information is merely at a different location. But I'm
>> not an expert. So 303 is probably what most of us use redirect
>> for, like when you click on save in a form and then you want to
>> redirect the user back to a different page.
>
> Actually, 302 means “repeat the same request at this other URI”
> whereas 303 means “please retrieve this other URI using GET.” The
> difference is that strictly according to RFC, 302 means the
> request should be repeated with the same method, so if you return
> a 302 to the browser in response to a POST, the browser would
> have to repeat the full POST at the redirect target address.

I've never seen anything except a GET sent after a 302 though.

Ain't browsers grand.
--  
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for  
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for  
details.
+ Help us build a better perl ORM: http://dbix- 
class.shadowcatsystems.co.uk/ +





More information about the Catalyst mailing list