Redirects // Re: [Catalyst] Re: forwarding to chained actions

Simon Wilcox simonw at digitalcraftsmen.net
Fri Apr 27 14:03:23 GMT 2007


On Tue, 24 Apr 2007, A. Pagaltzis wrote:

> _ALL_ POSTs should be followed by a redirect, ALWAYS.

This is really good advice but I was looking at the response code RFC
today [1] for an unrelated matter and found the following:

  If the 302 status code is received in response to a request other than
  GET or HEAD, the user agent MUST NOT automatically redirect the request
  unless it can be confirmed by the user, since this might change the
  conditions under which the request was issued.

It then goes on to say:

  Note: RFC 1945 and RFC 2068 specify that the client is not allowed to
  change the method on the redirected request.  However, most existing
  user agent implementations treat 302 as if it were a 303 response,
  performing a GET on the Location field-value regardless of the original
  request method. The status codes 303 and 307 have been added for servers
  that wish to make unambiguously clear which kind of reaction is expected
  of the client.

So, what do people do - do you send 303/307's "correctly" or just default
to 302 behaviour ?

Simon Wilcox
[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

-- 
Digital Craftsmen Ltd
Exmouth House, 3 Pine Street, London. EC1R 0JH
t 020 7183 1410 f 020 7099 5140 m 07951 758698
w http://www.digitalcraftsmen.net/



More information about the Catalyst mailing list