Redirects // Re: [Catalyst] Re: forwarding to chained actions
mreece at vinq.com
Fri Apr 27 17:27:29 GMT 2007
it would be nice if $c->res->redirect returned a 303 appropriately if
$c->req->method eq 'POST'.
i have in the past trapped it in 'end' to fix up the $c->res->status
if == 302 and $c->req->method eq 'POST', but lately i just don't bother.
On Apr 27, 2007, at 6:03 AM, Simon Wilcox wrote:
> 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  for an unrelated matter and found the following:
> If the 302 status code is received in response to a request other
> GET or HEAD, the user agent MUST NOT automatically redirect the
> 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
> request method. The status codes 303 and 307 have been added for
> that wish to make unambiguously clear which kind of reaction is
> of the client.
> So, what do people do - do you send 303/307's "correctly" or just
> to 302 behaviour ?
> Simon Wilcox
>  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/
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/
> catalyst at lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
michael reece :: software engineer :: mreece at vinq.com
More information about the Catalyst