[Jifty-commit] r605 -

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Feb 19 23:08:52 EST 2006


Author: jesse
Date: Sun Feb 19 23:08:48 2006
New Revision: 605

Modified:
   /   (props changed)
   jifty/trunk/lib/Jifty/Continuation.pm

Log:
 r24438 at truegrounds:  jesse | 2006-02-19 20:25:16 -0500
 * When calling a continuation, try to make sure that the urls are really different, not just differently canonicalized, lest we get an infinite loop


Modified: jifty/trunk/lib/Jifty/Continuation.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Continuation.pm	(original)
+++ jifty/trunk/lib/Jifty/Continuation.pm	Sun Feb 19 23:08:48 2006
@@ -149,8 +149,16 @@
 
 sub call {
     my $self = shift;
+    my $called_uri = $ENV{'REQUEST_URI'};
+    my $request_path = $self->request->path;
 
-    if (defined $self->request->path and $ENV{REQUEST_URI} ne $self->request->path . "?J:CALL=" . $self->id) {
+    # XXX TODO: WE should be using URI canonicalization
+    $called_uri =~ s{/+}{/}g; 
+    $request_path =~ s{/+}{/}g; 
+
+
+    if (defined $request_path and 
+        ($called_uri ne $request_path . "?J:CALL=" . $self->id)) {
         # Clone our request
         my $request = Clone::clone($self->request);
         


More information about the Jifty-commit mailing list