[Twisted-web] multiple sessions on same host:port
Colin Alston
karnaugh at karnaugh.za.net
Tue Oct 7 17:20:24 EDT 2008
On 2008/10/07 10:55 PM Federico Tomassini wrote:
> The problem is: each twisted-nevow application will want to create a
> cookie to handle the session. Being these cookies related to the same
> host:port, the different twisted-nevow applications will be in conflict,
> maybe overwriting the cookies created by their friends.
I'm not sure I agree with your deployment idea. Why not just link
these applications off the same process instead of complicating it
behind Apache?
Regardless of the reasons for that (I'm sure you have some) it's
perfectly possible to override the cookie created for Guard. It should
be easy to add a prefix for each if you override the SessionWrapper
object. From looking at it though, the actual session key is a
randomised hash not at all based on the hostname or port so it will
not conflict between different guarded instances. Logically this is a
good design because nothing stops you from having numerous different
guard instances in one app.
Read the source :)
More information about the Twisted-web
mailing list