[Catalyst-commits] r12613 - in Catalyst-Runtime/5.80/trunk: . lib/Catalyst/Engine

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Mon Jan 11 23:18:08 GMT 2010


Author: t0m
Date: 2010-01-11 23:18:08 +0000 (Mon, 11 Jan 2010)
New Revision: 12613

Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/CGI.pm
Log:
Fix URI bug masked by HTTP::Request::AsCGI

Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2010-01-11 23:05:19 UTC (rev 12612)
+++ Catalyst-Runtime/5.80/trunk/Changes	2010-01-11 23:18:08 UTC (rev 12613)
@@ -1,5 +1,10 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+  Bug fixed:
+   - Call ->canonical on URI derived from $ENV{REQUEST_URI} to get
+     paths correctly decoded. This bug was previously hidden by a bug
+     in HTTP::Request::AsCGI
+
   Documentation:
    - Clarify that uri_for_action works on private paths, with example.
 

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/CGI.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/CGI.pm	2010-01-11 23:05:19 UTC (rev 12612)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/CGI.pm	2010-01-11 23:18:08 UTC (rev 12613)
@@ -195,7 +195,7 @@
     my $query = $ENV{QUERY_STRING} ? '?' . $ENV{QUERY_STRING} : '';
     my $uri   = $scheme . '://' . $host . '/' . $path . $query;
 
-    $c->request->uri( bless \$uri, $uri_class );
+    $c->request->uri( bless(\$uri, $uri_class)->canonical );
 
     # set the base URI
     # base must end in a slash
@@ -203,7 +203,7 @@
 
     my $base_uri = $scheme . '://' . $host . $base_path;
 
-    $c->request->base( bless \$base_uri, $uri_class );
+    $c->request->base( bless(\$base_uri, $uri_class)->canonical );
 }
 
 =head2 $self->prepare_query_parameters($c)




More information about the Catalyst-commits mailing list