[mod_python] Session always create new session ID

Lukas Linhart Almad at include.cz
Sun Oct 3 01:40:33 EDT 2004


Greetings, 

I'm trying to use session management with mod_python.publisher. I'm testing 
following code: 

def index(req, sessID):
 req.content_type = "text/html"
 if not sessID:
  req.write("New session")
  relace = Session.Session(req)
 else:
  req.write("Restoring session "+sessID")
  relace = Session.Session(req, sessID)
 req.write("<a href=\"testing.py?sessID="+relace.id()+"\">Reload</a>")


Well, here is no problem with creating session or printing it's ID on 
"Reload". However, on each request Session.Session(req, sessID) generate a 
new ID. 

What I'm doing wrong / where problem should lie? 

Regards, 
-- 

Lukas "Almad" Linhart

[:: http://www.Include.cz/ ::]
[:: Including Your wishes ::]
[:: Almad at Include.cz ::]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
Url : http://modpython.org/pipermail/mod_python/attachments/20041003/347000a9/attachment.bin


More information about the Mod_python mailing list