You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Upayavira <uv...@upaya.co.uk> on 2004/05/27 12:04:13 UTC

Do session aware redirects work?

This might sound crazy, but I've got some code that, within an action, does:

  redirector.globalRedirect(true, "my-new-url");

When I trace it through within Eclipse, I find that in 
HTTPEnvironment.doRedirect, it finds the correct session. However, when 
I receive another request, the one coming in as a result of the 
redirect, I've got a different session ID, and therefore my code can't 
find crucial objects within the session.

Any idea what is going on? Do session aware redirects actually work?

Upayavira, who will probably find something completely obvious as soon 
as he sends this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Do session aware redirects work?

Posted by Upayavira <uv...@upaya.co.uk>.
Upayavira wrote:

> This might sound crazy, but I've got some code that, within an action, 
> does:
>
>  redirector.globalRedirect(true, "my-new-url");
>
> When I trace it through within Eclipse, I find that in 
> HTTPEnvironment.doRedirect, it finds the correct session. However, 
> when I receive another request, the one coming in as a result of the 
> redirect, I've got a different session ID, and therefore my code can't 
> find crucial objects within the session.
>
> Any idea what is going on? Do session aware redirects actually work?

Well. They don't work if you're using proxying, and haven't got 
ProxyPassReverse in your Apache config :-(

Because of that, the redirect is coming from a different URL, and thus 
the session cookie is not sent in by the browser.

> Upayavira, who will probably find something completely obvious as soon 
> as he sends this message.

Upayavira, who took a whole morning to sort this one out.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org