[Catalyst] $C -> uri_for containing current path in catalyst 5.90010

stevep at majestic12.co.uk stevep at majestic12.co.uk
Thu Mar 8 19:05:41 GMT 2012


Hi.

 

We were trying to use catalyst 5.90010 to run a webapp, and almost
everything is totally lovely, apart from a few redirects.

 

In version 5.90006 it all seems to be working well.

 

The rewrite is along the lines of:

 

sub exampleRedirect :Path( "/oldPath" ) Args(0)

{

    my ( $self, $c ) = @_;

    my %data = %{ $c -> req -> params };

    # . actions on %data removed

    my $url =  $c -> uri_for( $c -> controller('This') ->
action_for('newSub'), \%data );

    $c -> response -> redirect( $url , 301 ) ;

}

 

sub newSub :Path("/this/someOtherPath") Args(0)

{

                .

}

 

When the server is called, on 5.90006, for
http://somedomain/oldPath?cheese=nice, $url becomes
http://somedomain/this/someOtherPath?cheese=nice

 

On 5.9.0010, the same url becomes
http://somedomain/oldPath/this/someOtherPath?cheese=nice

 

Obviously checked http headers and output $url above.

 

Can anyone shed some light on this? It's probably something stupid I've
done, as I cannot find much in google.

 

Steve

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120308/b72ce50e/attachment.htm


More information about the Catalyst mailing list