[Twisted-web] __start_session__ and wget

Andrea Arcangeli andrea at cpushare.com
Fri Apr 8 22:44:45 MDT 2005

I got annoyed by

	wget https://www.cpushare.com/downloads/cpushare-0.16.tar.bz2

creating a weird file called cpushare-0.16.tar.bz2__start_session__=1,
so I removed it ;).

I wonder if this risks to break anything w.r.t. browser caching?
Everything is working fine so far on my site. Since my session is always
ssl protected, I doubt caching could ever be an issue for my usage, but
even the nevow examples in cleartext seems ok.

Comments welcome, and keep up the great work!

(btw, I won't read emails until Monday)

Index: Nevow/nevow/guard.py
--- Nevow/nevow/guard.py	(revision 1413)
+++ Nevow/nevow/guard.py	(working copy)
@@ -259,7 +259,8 @@
         if path.startswith(SESSION_KEY):
             key = path[len(SESSION_KEY):]
             if key not in self.sessions:
-                return urlToChild(request, *segments[1:], **{'__start_session__':1}), ()
+                #return urlToChild(request, *segments[1:], **{'__start_session__':1}), ()
+                return urlToChild(request, *segments[1:]), ()
             if cookie == key:
                 # /sessionized-url/${SESSION_KEY}aef9c34aecc3d9148/foo
@@ -267,7 +268,8 @@
                 #                  we are this getChild
                 # with a matching cookie
                 self.sessions[key].sessionJustStarted = True
-                return urlToChild(request, *segments[1:], **{'__session_just_started__':1}), ()
+                #return urlToChild(request, *segments[1:], **{'__session_just_started__':1}), ()
+                return urlToChild(request, *segments[1:]), ()
                 # We attempted to negotiate the session but failed (the user
                 # probably has cookies disabled): now we're going to return the

More information about the Twisted-web mailing list