You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by jg...@apache.org on 2005/08/08 16:03:26 UTC
svn commit: r230799 -
/httpd/mod_python/trunk/lib/python/mod_python/Session.py
Author: jgallacher
Date: Mon Aug 8 07:03:24 2005
New Revision: 230799
URL: http://svn.apache.org/viewcvs?rev=230799&view=rev
Log:
FileSession.__init__() was ignoring the fast_cleanup, verify_cleanup and
grace_period paramenters. The values of these are now determined in the order
__init__(), PythonOption setting, and finally the default value given in
Session.py.
Modified:
httpd/mod_python/trunk/lib/python/mod_python/Session.py
Modified: httpd/mod_python/trunk/lib/python/mod_python/Session.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/lib/python/mod_python/Session.py?rev=230799&r1=230798&r2=230799&view=diff
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/Session.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/Session.py Mon Aug 8 07:03:24 2005
@@ -363,14 +363,25 @@
class FileSession(BaseSession):
def __init__(self, req, sid=0, secret=None, timeout=0, lock=1,
- fast_cleanup=True, verify_cleanup=False, grace_period=240):
+ fast_cleanup=-1, verify_cleanup=-1, grace_period=-1):
opts = req.get_options()
- self._sessdir = os.path.join(opts.get('session_directory', tempdir), 'mp_sess')
+
+ if fast_cleanup == -1:
+ self._fast_cleanup = true_or_false(opts.get('fast_cleanup', DFT_FAST_CLEANUP))
+ else:
+ self._fast_cleanup = fast_cleanup
+
+ if verify_cleanup == -1:
+ self._verify_cleanup = true_or_false(opts.get('verify_cleanup', DFT_VERIFY_CLEANUP))
+ else:
+
+ if grace_period == -1:
+ self._grace_period = int(opts.get('grace_period', DFT_GRACE_PERIOD))
+ else:
+ self._grace_period = grace_period
+
self._cleanup_time_limit = int(opts.get('session_cleanup_time_limit',DFT_CLEANUP_TIME_LIMIT))
- self._fast_cleanup = true_or_false(opts.get('fast_cleanup', DFT_FAST_CLEANUP))
- self._verify_cleanup = true_or_false(opts.get('verify_cleanup', DFT_VERIFY_CLEANUP))
- self._grace_period = int(opts.get('grace_period', DFT_GRACE_PERIOD))
# FIXME
if timeout: