You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jonathan Vanasco <mo...@2xlp.com> on 2006/04/09 19:48:44 UTC

preventing/throttling successive form posts?

Does anyone know of a good idiomatic way to safeguard against people  
hitting reload and processing the same info twice?

I'm thinking someone here figured out a series of internal/external  
redirects to keep that from happening.

Right now, I just do a timeout variable in the session -> check if  
someone is throttled, if not process and set a timeout for 30seconds  
if successful.  I'm wondering if there's a more mod_perl way to make  
that happen.


Re: preventing/throttling successive form posts?

Posted by Torsten Foertsch <to...@gmx.net>.
On Sunday 09 April 2006 19:48, Jonathan Vanasco wrote:
> Does anyone know of a good idiomatic way to safeguard against people
> hitting reload and processing the same info twice?
>
> I'm thinking someone here figured out a series of internal/external
> redirects to keep that from happening.
>
> Right now, I just do a timeout variable in the session -> check if
> someone is throttled, if not process and set a timeout for 30seconds
> if successful.  I'm wondering if there's a more mod_perl way to make
> that happen.

I in general answer to a post request with 302 redirect. Have a look at 
Apache2::POST200 for a more or less drop in solution.

Torsten

Re: preventing/throttling successive form posts?

Posted by Barry Hoggard <ba...@tristanmedia.com>.
On Apr 9, 2006, at 1:48 PM, Jonathan Vanasco wrote:

> Does anyone know of a good idiomatic way to safeguard against  
> people hitting reload and processing the same info twice?
>
> I'm thinking someone here figured out a series of internal/external  
> redirects to keep that from happening.
>
> Right now, I just do a timeout variable in the session -> check if  
> someone is throttled, if not process and set a timeout for  
> 30seconds if successful.  I'm wondering if there's a more mod_perl  
> way to make that happen.


I normally do a redirect after a successful submit, so that reload  
doesn't re-submit.





--
Barry Hoggard
www.ArtCat.com -self-managed websites for artists/galleries
www.ArtCal.net - gallery/art guide
www.bloggy.com - weblog
AIM/Yahoo: hoggardb