[albatross-users] A problem with cookies and multiple apps in the same directory

Andrew McNamara andrewm at object-craft.com.au
Thu Nov 21 13:25:14 EST 2002


>But we can't use both apps.  If we go to one, then it sets a cookie with the 
>name of that appid, and a path of "/cgi-bin/dir".  When we then navigate to 
>the second app, it doesn't attempt to set a new cookie, but tries to use the 
>cookie set by the previous app, and dies with an exception:

Sorry about the delay replying to this - I think this is a typo in
Albatross's sesionfile.py. Can you change the "except OSError:" on line
209 to "except KeyError:" and let me know how that goes (I don't think
os.path.basename can raise OSError)?

--- sessionfile.py      8 Aug 2002 09:53:38 -0000       1.20
+++ sessionfile.py      21 Nov 2002 02:23:53 -0000
@@ -35,7 +35,7 @@
             c = Cookie.SimpleCookie(hdr)
             try:
                 return os.path.basename(c[self.app.ses_appid()].value)
-            except OSError:
+            except KeyError:
                 pass
         return None
 
-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list