Feature Request #3034

Request::redirect() $code parameter to be 303 as default (instead of 302)

Added by N Komay over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:06/30/2010
Priority:LowDue date:
Assignee:Woody Gilk% Done:

0%

Category:Core
Target version:v3.0.7
Resolution:wontfix Points:

Description

I just want to know how the community feels about changing the default value of $code param in Request::redirect() from 302 Found to 303 See other.

The code of 302 after POST submit causes browser to show the warning dialog, and sends the POST request it again if user agrees, while 303 does not do such a thing. Personally, I think that re-POST isn't something we, as developers, would want from regular users to do when it is not required, and so using 303 would be safer, and as such, the 303 should become a default value.

History

#1 Updated by Korney Czukowski over 4 years ago

I'm not sure about making it default, esp. since you may specify the code when using Request::redirect()...

Otherwise, there's a note (even though could be considered obsolete now):

http://tools.ietf.org/html/rfc2616#section-10.3.4:

Note: Many pre-HTTP/1.1 user agents do not understand the 303
status. When interoperability with such clients is a concern, the
302 status code may be used instead, since most user agents react
to a 302 response as described here for 303.

#2 Updated by Mathew Davies over 4 years ago

There's some additional information on the subject on wikipedia Post/Redirect/Get . There's no need for this ticket, it would just be easier to specify the 303 code when you need it.

#3 Updated by N Komay over 4 years ago

As I said, I just wanted to know what others think about it, and your declamations speak to me, so we can safely close this ticket and not change anything :)

Thanks guys!
Cheers!

#4 Updated by Woody Gilk over 4 years ago

  • Status changed from New to Closed
  • Target version set to v3.0.7
  • Resolution set to wontfix

Using 302 is appropriate in most situations, and it can be set per call when it needs to be different.

Also available in: Atom PDF