From: Gerald W. L. <Ger...@co...> - 2004-10-14 04:47:42
|
Colin McCormack wrote: >On Thu, 2004-10-14 at 10:59, Jeff Smith wrote: > > > >>I have seen some similar behaviour when I open >>multiple forms in a browser and that have the session >>ID stored in a cookie. I modified my application not >>to use cookies to store the session ID but instead >>stored the session ID in the form data and everything >>worked as expected. >> >> > >Cookie seems to be a common thread ... is this session-cookie mapping >something you rolled yourself, or is it using the Session_Cookies stuff? > >In any case, Cookies are stored in a global variable - from discussions >with Brent, it seems possible that globals can be corrupted if tclhttpd >enters the event loop via a (nested?) vwait and another incoming request >is serviced. > >A solution might be to store cookies per-socket. Needs more feedback >and investigation. > > Cookies *are* the problem. You need to ensure you use the Cookie calls that read them from the socket and not the uploaded directory. Since you are using sessions, I'd strongly suggest not using cookies, but rather a hidden field on the form with the session ID and the Session_Match API. If you really want cookies, repost next week (the Tcl Conference is eating most of my time right now). BTW -- this was covered in the "Secrets of TclHttpd" tutorial Monday morning at the Conference. -- +--------------------------------+---------------------------------------+ | Gerald W. Lester | "The man who fights for his ideals is | | Ger...@co... | the man who is alive." -- Cervantes | +--------------------------------+---------------------------------------+ |