[Twisted-Python] Sessions and URLs
Christopher Armstrong
radix at twistedmatrix.com
Sun Aug 10 07:46:37 MDT 2003
On Sat, Aug 09, 2003 at 11:44:12PM -0400, Edmund Dengler wrote:
>
> On Sat, 9 Aug 2003, Glyph Lefkowitz wrote:
>
> > "pattern match"? No, we just use a dictionary lookup. SessionWrapper
> > will already create a new session when the old one is no longer cached.
>
> If there is no pattern match such as "session-name:XXXXX", then how
> will you know if an entry is a cookie or a named child?
...
> Or am I misunderstanding this (which is quite possible)?
No, you've got it right, though your wording is odd (the session ID
isn't a "cookie", "cookie" means something completely different in our
context). I think the point glyph missed is that you're worried about
people visiting URLs with *old* session IDs in them, which is the same
problem I've been having.
>
> Regards,
> Ed
>
>
> >
> > On Saturday, August 9, 2003, at 11:45 AM, Edmund Dengler wrote:
> >
> > > So, the code is structured such that a cookie is not available, the
> > > normal
> > > children still get returned. Is this suppose to be how it works? Should
> > > this be changed so that a flag is available for "force session"? Or
> > > should
> > > a session always be forced (no option)?
> >
> > Sorry, this should be documented. You correctly figured out the series
> > of steps (more or less) but you missed the annotation of the request
> > :-).
> >
> > SessionWrapper mangles the request, slightly changing the semantics of
> > getSession, so that it may return None.
> > UsernamePasswordWrapper.getChild begins with
> >
> > s = request.getSession()
> > if s is None:
> > return request.setupSession()
> >
> > since it currently requires a session in order to operate. Eventually
> > I hope to remove this and have it operate without a session when
> > possible.
> >
> > > Should we have a pattern such as "session-name:cookie" so we can do a
> > > pattern match for old sessions no longer cached (and force a new
> > > session)?
> >
> >
> >
> > _______________________________________________
> > Twisted-Python mailing list
> > Twisted-Python at twistedmatrix.com
> > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> >
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
--
Twisted | Christopher Armstrong: International Man of Twistery
Radix | Release Manager, Twisted Project
---------+ http://twistedmatrix.com/users/radix.twistd/
More information about the Twisted-Python
mailing list