Or m/\A http/xims if you are Damian Conway or worried about PBP.
FYI HTTP is also valid.
On Apr 27, 2007, at 11:55 AM, Dave Rolsky wrote:
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
===================================================*/
_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/
catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/
_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/