Redirects // Re: [Catalyst] Re: forwarding to chained actions
Dave Rolsky
autarch at urth.org
Fri Apr 27 19:55:14 GMT 2007
On Fri, 27 Apr 2007, Bill Moseley wrote:
> sub post_redirect {
> my ( $c, $location ) = @_;
> my ($version) = $c->request->protocol =~ m/(\d+\.\d+)/;
>
> # Make location absolute
> $location = $c->uri_for( $location )
> unless $location =~ /http/;
I'd make that regex /^http/
It's not inconceivable there could be a path with http in it.
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/
More information about the Catalyst
mailing list