opensubscriber
   Find in this group all groups
 
Unknown more information…

c : cricket-developers@lists.sourceforge.net 20 June 2007 • 7:38PM -0400

[cricket-developers] grapher.cgi and Perl 5.8.8 + PathINFO ATTN:Jason Signalness
by Kevin Stewart

REPLY TO AUTHOR
 
REPLY TO GROUP



I was looking at the cricket UrlStyle pathinfo yesterday and found its
broken with perl 5.8.8 (Debian stable) causing the path info not to be
striped before adding the new path info.
The perl 5.8.8 implementation of path_info is incorrect causing this to
break
I see that Jason Signalness (I cant find his email so am posting here)
found this a while ago but did not seem to get anywhere with fixing it

I have logged a bug to Debian as I cant be bothered creating a bitcard
account to log a bug directly to perl.org
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=429611

it looks like CGI.pm is trying to remove the currently set pathinfo from
the url not the one that was passed to it from the web server before
adding the new pathinfo
below is a quick and dirty patch to fix it

hope this helps you Jason and anyone else seeing this issue

Kevin

--- /usr/share/perl/5.8.8/CGI.pm 2006-12-06 00:52:37.000000000 +1300
+++ CGI.pm 2007-06-19 14:32:53.000000000 +1200
@@ -2623,6 +2623,7 @@
     $rewrite++   unless defined $rewrite;

     my $path        =  $self->path_info;
+    my $realpath    =  $ENV{PATH_INFO};
     my $script_name =  $self->script_name;
     my $request_uri = $self->request_uri || '';
     my $query_str   =  $self->query_string;
@@ -2632,7 +2633,7 @@

     my $uri         =  $rewrite && $request_uri ? $request_uri : $script_name;
     $uri            =~ s/\?.*$//;                                 # remove query string
-    $uri            =~ s/$path$//      if defined $path;          # remove path
+    $uri            =~ s/$realpath$//      if defined $realpath;          # remove path

     if ($full) {
my $protocol = $self->protocol();



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
cricket-developers mailing list
cricket-developers@list...
https://lists.sourceforge.net/lists/listinfo/cricket-developers

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

opensubscriber is not affiliated with the authors of this message nor responsible for its content.