[Jifty-commit] r3453 - in jifty/trunk: lib/Jifty share/web/templates/__jifty/webservices

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue Jun 12 11:29:05 EDT 2007


Author: clkao
Date: Tue Jun 12 11:28:57 2007
New Revision: 3453

Modified:
   jifty/trunk/lib/Jifty/Request.pm
   jifty/trunk/lib/Jifty/Web/PageRegion.pm
   jifty/trunk/share/web/templates/__jifty/webservices/xml

Log:
Always give the dispatcher unescaped path like fastcgi does,
from standalone, webservice, and region entrance.


Modified: jifty/trunk/lib/Jifty/Request.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Request.pm	(original)
+++ jifty/trunk/lib/Jifty/Request.pm	Tue Jun 12 11:28:57 2007
@@ -221,7 +221,9 @@
     my $self = shift;
     my ($cgi) = @_;
 
-    my $path = $cgi->path_info;
+    # always get the unescaped path for dispatcher, which is already
+    # the case for fastcgi, but not standalone.
+    my $path = URI::Escape::uri_unescape($cgi->path_info);
     $path =~ s/\?.*//;
     $self->path( $path );
 

Modified: jifty/trunk/lib/Jifty/Web/PageRegion.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/PageRegion.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/PageRegion.pm	Tue Jun 12 11:28:57 2007
@@ -215,7 +215,7 @@
             $self->argument($2 => $value);
         }
         if ($key =~ /^region-(.*)$/ and $1 eq $self->qualified_name and $value ne $self->default_path) {
-            $self->path($value);
+            $self->path(URI::Escape::uri_unescape($value));
         }
 
         # We should always inherit the state variables from the uplevel request.

Modified: jifty/trunk/share/web/templates/__jifty/webservices/xml
==============================================================================
--- jifty/trunk/share/web/templates/__jifty/webservices/xml	(original)
+++ jifty/trunk/share/web/templates/__jifty/webservices/xml	Tue Jun 12 11:28:57 2007
@@ -35,7 +35,7 @@
 
         $new ||= Jifty::Web::PageRegion->new(
             name           => $f->name,
-            path           => $f->path,
+            path           => URI::Escape::uri_unescape($f->path),
             region_wrapper => $f->wrapper,
             parent         => Jifty->web->current_region,
             defaults       => \%defaults,


More information about the Jifty-commit mailing list