[mod_python] Sessions function curiously in Internet Explorer

Paul Hide paul.hide at gmail.com
Sat Oct 1 06:36:19 EDT 2005


The code below behaves differently in FireFox and Internet Explorer, is that
because there is something wrong with the code? Or is it just IE?

Versions are Apache 2.0.54, mod_python 3.1.3 running on win 2k, but the same
is true when pages are served from Debian Sarge Box with slightly different
versions of the server and module.

Paul Hide

#FireFox 1.07 counter increments each time you click go
#IntExp 5.5 & 6 counter never gets beyon 2 unless you delete the cache
between clicks

from mod_python import Session

def test(req):
sess = Session.Session(req)
if sess.is_new():
sess.set_timeout(100)
sess['myvar'] = 1
req.write('new ')
req.write(sess.id())
#if you dont save it, it is new every time
sess.save()
else:
sess.load()
sess['myvar'] = sess['myvar'] + 1
req.write(str(sess['myvar']))
sess.save()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20051001/365a073e/attachment.html


More information about the Mod_python mailing list