Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: CGI::Application redirect loses cookie

by ww (Archbishop)
on Jan 06, 2009 at 02:49 UTC ( [id://734328]=note: print w/replies, xml ) Need Help??


in reply to CGI::Application redirect loses cookie

"Kludgy?!"

My perspective, coming to perlish ways from an html background, is that using a meta refresh (or, recognizing that some search engines penalize those, using an intermediate page) is an absolutely standard technique, involving minimal muss and fuss.

Granted that those "If you are not redirected within 5 seconds...." pages can be annoying, a little agita seems bearable if that statement you quote, "effectively means you cannot Redirect and send a cookie on the same request," is fundamentally accurate.

All that said, I suspect there is a perlish way to do what you're seeking... but I also suspect that that mechanism, if one exists, will be kludgy, hackish, or (worse) utterly unsafe.

  • Comment on Re: CGI::Application redirect loses cookie

Replies are listed 'Best First'.
Re^2: CGI::Application redirect loses cookie
by bradcathey (Prior) on Jan 06, 2009 at 02:56 UTC

    Hmmmm, points well taken. Maybe I'll just have to buck up and go with "kludgy." But you have to admit would be nice if I good just do $self->redirect() :)

    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
      Perhaps not the answer you were looking for, but maybe you need a framework that supports server side redirects, e.g. with Catalyst your login controller would be able to forward control to the admin controller without going through an HTTP redirection.

        Note CGI::Application can do this too with the Forward plugin.

        But I think the poster needs an actual redirect in this case.

        --
        જલધર

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://734328]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-25 13:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found