Apache Mod-Python - Resolved: (MODPYTHON-86) Multiple session cookies created when ApplicationPath is set

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > October 2005 > Resolved: (MODPYTHON-86) Multiple session cookies created when ApplicationPath is set





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Resolved: (MODPYTHON-86) Multiple session cookies created when ApplicationPath is set
Jim Gallacher (JIRA)

2005-10-28, 5:31 pm

[ http://issues.apache.org/jira/brows...HON-86?page=all ]

Jim Gallacher resolved MODPYTHON-86:
------------------------------------

Fix Version: 3.2
Resolution: Fixed

> Multiple session cookies created when ApplicationPath is set to /
> -----------------------------------------------------------------
>
> Key: MODPYTHON-86
> URL: http://issues.apache.org/jira/browse/MODPYTHON-86
> Project: mod_python
> Type: Bug
> Versions: 3.2
> Environment: mod_python-3.2.2b.win32-py2.4.exe
> Reporter: Jim Gallacher
> Assignee: Jim Gallacher
> Fix For: 3.2


>
> Originally reported by Villiam Manera on mod_python list.
> """
> Apache configuration --> PythonOption ApplicationPath '/'
> Before the beta there was only a cookie: pysid with path = '/'
> With the beta in place there are many pysid with different path,seems one each module I call, example:
> Pysyd: e81c661b3c9d11948a3b643c4c031695855e254a
61239279086ef1bb8916c10c path:/
> Pysid: 855e254a61239279086ef1bb8916c10c path: /cgi-mpy/cgi_mpy_utentis.py/
> Pysyd: 855e254a61239279086ef1bb8916c10c path: /cgi-mpy/cgi-mpy_menu.py/
> Pysyd: 855e254a61239279086ef1bb8916c10c path: /comm/comm_menu.py/
> Pysyd: 855e254a61239279086ef1bb8916c10c path: /pf/pf_magauto.py/ ......
> """
> Villiam traced the problem to the following code in Session.py
> class BaseSession(dict):
> .........
> if self._sid:
> # attempt to load ourselves
> self.lock()
> if self.load():
> self._new = 0
> if not req.headers_out.has_key("Set-Cookie"):
> Cookie.add_cookie(self._req, Cookie.Cookie(session_cookie_name, self._sid))
> The last two lines were added to 3.2 to support some new session handling functionality. For various reasons that new functionality has been deferred until 3.3, but the new code was not removed. That should not be a problem, except that it is both buggy

and wrong. :-(
> The correct fix for the 3.2.x release is to remove those 2 lines.
> if self._sid:
> # attempt to load ourselves
> self.lock()
> if self.load():
> self._new = 0
> #if not cookies.has_key(session_cookie_name):
> # Cookie.add_cookie(self._req, self.make_cookie())


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com