Hi David,

Thanks for testing that.

I have retested, using the code you provided in a fresh controller, and the 
problem persists. We suspect it may have something to do with the deployment 
rather than just catalyst, however - as this is the first time the application 
has been deployed on mod_proxy_fcgi I suspect it may be a deployment 
configuration, rather than core issue.

I notice that $c ->req -> base on 5.90010 returns the full URL requested, 
rather than just "scheme://domain:port/".

I noticed on the docs page for mod_proxy_fcgi, some references to PATH_INFO - 
http://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.htm - thus re-enforcing my 
suspicions of a config issue. Given the lack of relevant documentation I could 
find wrt catalyst with mod_proxy_fcgi we may just slip back to our previous 
deployment configuration and see if that resolves the issue.

Steve

-----Original Message-----
From: David Schmidt [mailto:davew...@gmx.at] 
Sent: 08 March 2012 19:50
To: The elegant MVC web framework
Subject: Re: [Catalyst] $C -> uri_for containing current path in catalyst 
5.90010

forgot to include my catalyst version

[info] Foo powered by Catalyst 5.90010

On 8 March 2012 20:49, David Schmidt <davew...@gmx.at> wrote:
> I tested your code
>
> sub exampleRedirect :Path(/oldPath) Args(0) {
>    my ( $self, $c ) = @_;
>    my %data = %{ $c->req->params };
>    my $url =  $c->uri_for( $self->action_for('newSub'), \%data );
>    $c->response->redirect( $url , 301 );
>    $c->log->debug('########: ' . $url); }
>
> sub newSub :Path(/this/someOtherPath) Args(0) {}
>
>
> [debug] Redirecting to "http://myapp.at:3000/this/someOtherPath?cheese=nice";
>
>
>
> On 8 March 2012 20:05,  <ste...@majestic12.co.uk> wrote:
>> 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
>>
>>
>>
>>
>> _______________________________________________
>> List: Catalyst@lists.scsys.co.uk
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive: 
>> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>> Dev site: http://dev.catalyst.perl.org/
>>

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/




_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to