[Catalyst] Re: Catalyst::Example::InstantCRUD RFC
Alex Kavanagh
alex at tinwood.homelinux.org
Sat Jan 21 12:21:32 CET 2006
At Fri, 20 Jan 2006 14:49:37 -0800,
apv wrote:
>
> Nice going.
>
> On Friday, January 20, 2006, at 02:35 PM, Zbigniew Lukasiak wrote:
> > I made the frist step towards
> > http://lists.rawmode.org/pipermail/catalyst/2006-January/004537.html
> > At least now I don't modify values with GET.
>
> In regards to this (from Aristotle):
> 2. In response to a POST, handlers *never* return a page,
> *always* a 303 redirect.
> ...
> (And please dont use 302; in practice 302 works because
> browsers have to accomodate that everyone does this wrong, but
> 303 is the correct status to use, and is supported just as
> well.)
>
> I'm currently doing this in my successful POST handlers:
> my $status = $c->request->protocol eq 'HTTP/1.1' ?
> 303 : 302;
I might rewrite it the other way:
my $status = ($c->request->protocol eq 'HTTP/1.0') ? 302 : 303;
This way only 1.0 clients get 302 and everybody later 1.1 (and
futures?) would get 303 assuming forwards compatibility. But maybe
that's a bad assumption.
--
Alex.
More information about the Catalyst
mailing list