[Catalyst] The old double-post issue

Bill Moseley moseley at hank.org
Thu Sep 21 23:33:07 CEST 2006

On Thu, Sep 21, 2006 at 05:09:07PM -0400, Perrin Harkins wrote:
> Sure, but something strange happened, so a different message is a
> reasonable response.  We just provide a message for this about how the
> transaction wasn't processed because another identical one just came
> through in the last minute and it looks like a duplicate.  That seems
> pretty easy to understand.

The problem, which I can reproduce in FF by hitting escape between
submits, is that the first request completes as normal (and would
return a "Transaction Completed!" response page) but, then the
second request (which is what the browser is now following) sees that
the transaction is no longer valid and returns and error page.  But
that doesn't tell the end-user that the transaction really happened.

My code now detects that something doesn't quite make sense and gives
a slightly smarter message.  But, it's not always easy to see a
request and know that it's already happened vs. just is not in a
state where that kind of request is allowed.

Mostly, I now say "Did you submit the form twice?" kind of thing.  It
would help if I moved to a more atomic test/update on my form's unique
token than C::P::RequestToken provides.

Bill Moseley
moseley at hank.org

More information about the Catalyst mailing list