Opened 13 years ago

Closed 13 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


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/", line 299, in HandlerDispatch

result = object(req)

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

return ModPythonHandler()(req)

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

response = middleware_method(request, response)

File "/apps/django/lib/django/middleware/", line 73, in process_response + 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 Changed 13 years ago by anonymous

Resolution: duplicate
Status: newclosed

Sorry, looks like duplicate of #395.

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