[Catalyst] Usage of $c->uri_for and $c->res->redirect
Dustin Suchter
dsuchter at ucla.edu
Wed Mar 26 20:13:13 GMT 2008
Let's say I want to send people back and forth between an HTTP
connection and an HTTPS connection on a server based on some action. For
example, clicking on a "logout" button from within my application while
connected via HTTPS does something like:
$c->res->redirect("http://foo.com/");
The above seems like a fine solution except it totally disregards the
beauty of uri_for, which I would love to be using for stuff like this.
Without uri_for, problems arise when you do things like test via the
built in Perl webserver (the one running on port 3000 by default) while
on the same webserver as my "production" application.
So the real question is, how do I properly refer to my webserver and/or
application root and include port or SSL flags? I guess I'm looking for
something like $0 within uri_for.
-d
More information about the Catalyst
mailing list