A. Pagaltzis wrote:
> * Matt S Trout <[EMAIL PROTECTED]> [2007-05-20 15:55]:
> > I worked on some Maypole apps a few years back that -didn't-
> > redirect and behaved the way you're looking at implementing and
> > the "wrong URL" problem turned out to be a usability nightmare
sub update : Local {
my ($self, $c) = @_;
$c->detach('view') unless $c->request->method eq 'POST';
...
> That, plus the re-submit when the user hits the Back button.
...
unless ($c->validate_token) { # Catalyst::Plugin::RequestToken
$c->stash(message => 'Deja vu!'); # optional verbosity
$c->detach('view');
}
# do update here
...
$c->remove_token;
$c->forward('view');
}
> > I'd strongly, strongly recommend against it, sending a 302
> > really isn't that bad.
>
> Or 303. ;-)
No need for redirects and all the problems they impose.
--
Bernhard Graf
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/