fix parameters
Christian Hansen [Fri, 15 Apr 2005 16:30:47 +0000 (16:30 +0000)]
lib/Catalyst/Engine/CGI.pm
t/lib/TestApp/Controller/Action/Forward.pm

index 936a38c..84fadd9 100644 (file)
@@ -116,11 +116,22 @@ sub prepare_headers {
 
 sub prepare_parameters {
     my $c = shift;
+    
+    my ( @params );
 
-    for my $param ( $c->cgi->param ) {
-        my @values = $c->cgi->param($param);
-        $c->req->parameters->{$param} = ( @values > 1 ) ? \@values : $values[0];
+    for my $param ( $c->cgi->param ) { 
+        for my $value (  $c->cgi->param($param) ) {
+            push ( @params, $param, $value );
+        }
     }
+    
+    for my $param ( $c->cgi->url_param ) { 
+        for my $value (  $c->cgi->url_param($param) ) {
+            push ( @params, $param, $value );
+        }
+    }
+    
+    $c->req->_assign_values( $c->req->parameters, \@params );
 }
 
 =item $c->prepare_path
index 8a88e7f..1d65d14 100644 (file)
@@ -38,7 +38,7 @@ sub jojo : Relative {
 
 sub inheritance : Relative {
     my ( $self, $c ) = @_;
-    $c->forward('engine/response/cookies/one');
+    $c->forward('/action/inheritance/a/b/default');
     $c->forward('five');
 }