Redirects // Re: [Catalyst] Re: forwarding to chained actions

Christian Storm storm at iparadigms.com
Fri Apr 27 20:03:51 GMT 2007


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 at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/ 
> catalyst at lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/




More information about the Catalyst mailing list