Markku Uttula wrote: > > Petr Fejfar wrote: > >> You need to handle the cookies yourself. That is; you need to store them > >> yourself the way you deem suitable. When you "come back" to a site that > >> needs a previously saved cookie, you will need to fetch it from the > >> place you stored it and provide it to the site. > >> > >> Handling cookies is not and should not be Synapse's job. Synapse is > >> supposed to handle network protocols, not do state management. > > > > Synapse parses cookies into string list property > > THTTPSend.Cookies and its content will be reinstereted > > into headers of consecutive HTTP request automatically. > > > > Hence if your next request goes to a host > > the received cookies are related to, > > you do not need any extra handling > > This requires, I believe, that you use the same instance of the object > both times? For me, when working with HTTP, it's usually on the lines of... > > 1. Create object > 2. Use it > 3. Free and nil > 4. Forget it (next time we start at #1 again) >
ah, see that's where cookies come in to do your session management: 1. SessionID in cookie? no: create one, add cookie header 2. Session in session storage by SessionID? no: create one, add to session storage 3. (restart session timeout counter) 4. use objects stored with session next request: 1. SessionID in cookie! 2. Session in session storage by SessionID! 3,4 the same and then have a separate thread to check session timeouts to cleanup old sessions yes, it's a lot of work, but that's generally what a web-scripting platform provides ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
