On Feb 19, 1:32 pm, mdipierro <[email protected]> wrote:
> To set the expiration for the session cookie and thus making it
> persistent just do:
>
> response.cookies[response.session_id_name]['expires']="Fri, 3 Aug
> 2009 20:47:11 UTC"
For some reason I'm doing this wrong. If I log the contents of
'response' I see
'response.cookies= Set-Cookie: session_id_dw=127-0-0-1-
acc765d2-5ec1-4551-86bb-14ba69724ece; expires=Thu, Feb 19 2009,
21:53:44; Path=/'
But the session doesn't seem to expire and if I look using firefox's
"page information" dialog, the cookie is shown as expiring "at the end
of the session".
Is it because after doing this (as part of form validation) I'm then
redirecting?
form_login = FORM(login form)
if form_login.accepts(request.vars, formname="form_login"):
fill_in_session(expiry=datetime.now() + default_expiry_delta) #
this sets 'expires' as above
redirect(URL(r=request,c='event',f='index'))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---