Using the browser developer tools, on the subsequent navigations, see if 
(a) the browser is sending the session cookie to the server and (b) the 
server is sending *the same* session cookie back. If you are transitioning 
from http to https and have either set session.secure() or 
request.requires_https(), the original session cookie will not be returned 
to the server. Also, if you transition from being logged in to being logged 
out, the session will be cleared by default.

Anthony

On Wednesday, February 3, 2016 at 4:54:36 PM UTC-5, Dan wrote:
>
> I use a session variable to pass some info with a redirect:
>
>     session.OrigText = XML(str(OrigText))
>     redirect(URL('SearchResultsOrigText'))
>
> It arrives at the new URL / page / view - SearchResultsOrigText  - and 
> works Ok. 
> But when from that new URL - SearchResultsOrigText- I navigate away (and 
> it doesn't matter where I go from this new page), when returning with the 
> 'back" button of the browser, the session.OrigText is now empty (showing as 
> 'None').
>
> This behaviour is happening only on PA and not locally.
> I do not use session.forget anywhere in my code.
>
> Trying to pass the 'html heavy' content in the OrigText as a dictionary 
> variable (not a session variable) gets me into another interesting 
> issue...Python Anywhere says "Something's wrong 502- Back End". 
> (Silent failing ?) This happens on PythonAnywhere but NOT locally as well.
> Sanitizing this var doesn't help...
>
> But let's focus on the first question...Why is the session variable lost 
> after a redirect and then leaving the new page / view 
>  when hosted on PythonAnywhere and NOT locally ?
>
> Thanks
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to