[Zope] BUG: Conflict competing write causes loss of form input

Jim Fulton jim@digicool.com
Mon, 06 Dec 1999 12:35:19 -0500


"Li Dongfeng (RA of H. Wong)" wrote:
> 
> If you create new object in a form action, and the form action
> takes noticable time to finish, this bug may appear if two
> person is submitting the form simutaneously.
> One of the persons may lose his form input.
> 
> These steps can reproduce this bug:

(snip excellent research)

> In addition to the loss of form input bug,  any suggestion on
> a work around of the conflict competing write problem?

I just checked in a fix for this.  I neglected to reset
the request body (a file-like object) when retrying the
request.

The fix entailed adding:

        self.stdin.seek(0)

to the start of the HTTPRequest.retry method in
lib/python/ZPublisher/HTTPRequest.py.

Thanks for reporting this. Nice research.

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.org    

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.