Opened 19 years ago

Closed 19 years ago

#1057 closed enhancement (duplicate)

cannot set SESSION_COOKIE_AGE to None

Reported by: anonymous Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If I want to use the Session Middleware to set the initial cookie to be only valid for the browser session
(meaning would like to expire it after the browser is closed), I get this:
Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

File "/apps/python/v2/v242/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch

result = object(req)

File "/apps/django/lib/django/core/handlers/modpython.py", line 165, in handler

return ModPythonHandler()(req)

File "/apps/django/lib/django/core/handlers/modpython.py", line 145, in call

response = middleware_method(request, response)

File "/apps/django/lib/django/middleware/sessions.py", line 73, in process_response

datetime.datetime.now() + datetime.timedelta(seconds=SESSION_COOKIE_AGE))

TypeError: unsupported type for timedelta seconds component: NoneType

Basically, I would like the cookie to be not stored on disk by the clients browser, achieved by setting
max_age=None (?).
Maybe have a separate variable for the session database?

Change History (1)

comment:1 by anonymous, 19 years ago

Resolution: duplicate
Status: newclosed

Sorry, looks like duplicate of #395.

Note: See TracTickets for help on using tickets.
Back to Top