Here is what I do ...

$cookie = mycookiesetter('cookiename', etc, ...);
$r->err_headers_out->add('Set-Cookie' => $cookie);
$m->redirect('newpage.html');

mycookiesetter is just a function to create the string to pass to the next line.

John Halladay
www.greenaspen.com


John (Versimedia Admin) wrote:
I have a login page using Mason -- where the user types a username/password and if successful, they will be redirected to the front page of the site.

The problem is, I need to set a Cookie on the redirect -- and it seems that whichever redirect method I use, that the cookies disappear (they don't show in the returned header).

How can I do a redirect to a new page (not new mason code) + Set a cookie in mason?

I know how to do it manually (IE: creating the header) -- is it possible to abort output from mason and send my own header I create manually (ie: thru print statements)

Or is there another way to handle this...

Thanks
-John




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to