[mod_python] Issue w/ Internal Redirect and Sessions

Scott Sanders sanders at apache.org
Sun Jan 9 17:51:35 EST 2005


I would assume that you can just say session.unlock() before you 
redirect.

I haven't used PSP though, so you'll just have to try it.

On Jan 9, 2005, at 2:44 PM, Feghhi, Jalil wrote:

> Scott,
>  
> How do I do it from psp code? In my psp code, I have simply added the 
> global variable 'session' and I think mod-python just creates the 
> session that way. Any way I can control it from psp?
>  
> -Jalil
>
>
> From: Scott Sanders [mailto:sanders at apache.org]
>  Sent: Sunday, January 09, 2005 2:10 PM
> To: Feghhi, Jalil
> Cc: mod_python at modpython.org
> Subject: Re: [mod_python] Issue w/ Internal Redirect and Sessions
>
>
> You need to unlock the session before doing an internal redirect. The 
> session only gets unlocked at the end of the request in which it is 
> created, which will not happen with an internal redirect, thus the 
> lockup.
>
>
>
>  Scott
>
>
>
>  On Jan 9, 2005, at 11:27 AM, Feghhi, Jalil wrote:
>
>
>
>
>
>  I have noticed if I do an internal redirect (using the 
> internal_redirect method in request object) from a psp page to another 
> psp page, I get into a dead lock if both pages have used the session 
> object. When I remove it from one of psp pages, everything works. It 
> seems to me that this is because the second page want to lock the 
> session object and cannot. Is that
>
>
>
> Is this the way it is supposed to be?
>
>
>
> I am trying to send all my requests to a dispacher.psp and then do an 
> internal redirect but I need the session objects in both my psp pages. 
> What is the right way to implement something like this?
>
>
>
> Thanks,
>
>
>
> -Jalil
>
>
>
> _______________________________________________
>
>  Mod_python mailing list
>
>  Mod_python at modpython.org
>
>  http://mailman.modpython.org/mailman/listinfo/mod_python
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3029 bytes
Desc: not available
Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050109/108739b2/attachment.bin


More information about the Mod_python mailing list