R: [mod_python] Problem with Session module with multiple script alias not under t he document root

Neil Beattie neilb at nbt.co.za
Sat Nov 29 16:54:19 EST 2003


> I'm sorry but still don't work.
> I'm removed all references to cgi and I moved all my directory with .py
> under document root:
> 
> DocumentRoot "C:/wwwroot/cartelle_sito_mdn"
> <Directory   "C:/wwwroot/cartelle_sito_mdn/script/cgi/cgi-py">
> 
> and with this new configuration req.headers_out:
> {'Set-Cookie': 'pysid=d4d10ab8e7917b43becbff01a2452f7e;
> path=/script/cgi/cgi-mpy/\', 'Cache-Control': 'no-cache="set-cookie"'} 
> and if I relod the page it never passed to req.headers_in


Looks like the path is not correct (extra \)
try adding the following line to your httpd.config  addHandler entry:

PythonOption ApplicationPath /script/cgi/cgi-mpy


I have just had the same problem but have not yet discovered where the extra \ 
comes from ( it is in _req.hlist.directory in session.py)




> 
> if I modify se session module:
> def make_cookie(self):
> 	....
>       c.path = ''   #dirpath[len(docroot):]
> then req.headers_out become:
> {'Set-Cookie': 'pysid=fb35b851ad27e7effe820c36871bc9b4; path=',
> 'Cache-Control': 'no-cache="set-cookie"'} 
> and If I relod the page it go to req.headers_in:
> {'Cookie': 'pysid=fb35b851ad27e7effe820c36871bc9b4', 'Connection':
> 'Keep-Alive', ...} 
> and req.heades_out : {}
> 
> so why if something else then '' is in path the pysid wasn't writing into
> the html heading? 
> 

Neil Beattie
NB Technology (Pty) Ltd



More information about the Mod_python mailing list