[Twisted-web] remove ugliness when creating Nevow sessions

Andrea Arcangeli andrea at cpushare.com
Tue Dec 13 15:44:10 MST 2005


This isn't only ugly, it also screwup wget. I left it commented just in
case.

Index: Nevow/nevow/guard.py
===================================================================
--- Nevow/nevow/guard.py	(revision 3434)
+++ Nevow/nevow/guard.py	(working copy)
@@ -299,7 +299,8 @@
         if path.startswith(SESSION_KEY):
             key = path[len(SESSION_KEY):]
             if key not in self.sessions:
-                return urlToChild(ctx, *segments[1:], **{'__start_session__':1}), ()
+                #return urlToChild(ctx, *segments[1:], **{'__start_session__':1}), ()
+                return urlToChild(ctx, *segments[1:]), ()
             self.sessions[key].setLifetime(self.sessionLifetime)
             if cookie == key:
                 # /sessionized-url/${SESSION_KEY}aef9c34aecc3d9148/foo
@@ -307,6 +308,7 @@
                 #                  we are this getChild
                 # with a matching cookie
                 self.sessions[key].sessionJustStarted = True
+                #return urlToChild(ctx, *segments[1:], **{'__session_just_started__':1}), ()
                 return urlToChild(ctx, *segments[1:]), ()
             else:
                 # We attempted to negotiate the session but failed (the user



More information about the Twisted-web mailing list