|No such thing as a small change|
CGI::Application redirect loses cookieby bradcathey (Prior)
|on Jan 06, 2009 at 01:51 UTC||Need Help??|
bradcathey has asked for the
wisdom of the Perl Monks concerning the following question:
Using CGI::Application::Plugin::Session and CGI::Application::Plugin::Redirect I was struggling with a session cookie being rewritten and losing values between trips to the server. Finally another coder pointed me to this piece that states:
Redirection—or any other non standard (200 OK) output page HTTP result —does not allow additional HTTP headers to be added to the request, which effectively means you cannot Redirect and send a cookie on the same request. Instead you have to create an intermediate page contains redirect link in a META tag, or a phyical HREF link the user clicks on to go to the next page. HTML pages and browsers support the META Refresh tag which makes this possible."
Seems kludgy at best, so I was wondering if there is another way to get around this? Here's the scenario:
So, is there a way to avoid the HTML metatag redirect method and keep it Perlish? Thanks!
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot