[mod_python] Bug report: mod_python session hangs linux apache 2.2 .

guo tie guotie.9 at gmail.com
Tue Sep 5 01:52:20 EDT 2006


hi,
   all.
   i found the mod_python session under linux apache 2.2 mpm-worker have
problem.

linux: 2.6.17
apache: 2.2 mpm-worker
python: 2.4.3
mod_python 3.2.10

Now, the test.py is :

from mod_python import apache
from mod_python import Session
import sys

class Dispatcher(object):
    def __init__(self, req):
        self._req = req
        self._uri =  req.uri

    def dispatch(self, req):
        req.content_type =      'text/plain'
        import mod_python
        req.write(mod_python.version)
        req.write('\n')
        self.sess =     Session.Session(req)
        req.write("after create session\n")
        self.sess['obj'] =      'abcdtest'
        req.write("after sess['ob'] = 'abcdtest'\n")
        self.sess.set_timeout(60 * 60)
        req.write("after self.set_timeout(60 * 60)\n")
        self.sess.save()
        req.write("after sess.save()\n")
        req.write(self.sess['obj'])

        return apache.OK

def handler(req):
    mypatch =   Dispatcher(req)
    return mypatch.dispatch(req)

when i use ie or firefox visit the page, i was hanged after output
3.2.10

i think this is the session bug with apache mpm mode, i see somebody else
have mentioned it .

i have test them under windows, apache 2.2, i works ok.

-- 
Ìú¸ç
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060905/e81c0ef7/attachment.html


More information about the Mod_python mailing list