[interchange-cvs] interchange - jon modified 2 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Wed Dec 31 17:46:05 UTC 2008


User:      jon
Date:      2008-12-31 17:46:05 GMT
Modified:  .        WHATSNEW-5.7
Modified:  lib/Vend Dispatch.pm
Log:
Fixed rare bug that caused requests to / URL with a query string to fail, e.g.:

    http://hostname/?somevar=1

Interchange in that case looked for a page called "?somevar=1" and of course
didn't find it.

Thanks to David Christensen <david at endpoint.com> for the fix.

Revision  Changes    Path
2.22                 interchange/WHATSNEW-5.7


rev 2.22, prev_rev 2.21
Index: WHATSNEW-5.7
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.7,v
retrieving revision 2.21
retrieving revision 2.22
diff -u -u -r2.21 -r2.22
--- WHATSNEW-5.7	5 Dec 2008 22:15:35 -0000	2.21
+++ WHATSNEW-5.7	31 Dec 2008 17:46:05 -0000	2.22
@@ -7,19 +7,28 @@
 
 See UPGRADE document for a list of incompatible changes.
 
+
 Interchange 5.7.2 not yet released.
 
 Core
 ----
 
-* Enable catalog usertags within dispatch routines.
+* Enabled catalog usertags within dispatch routines.
 
 * SpecialSub order_missing added (#221).
 
-* Make TAX_CATEGORY_FIELD work as intended, where a colon-separated
+* Made TAX_CATEGORY_FIELD work as intended, where a colon-separated
   table and field will work as well as a simple field in the same table
   as the item.
 
+* Fixed rare bug that caused requests to / URL with a query string to fail, e.g.:
+
+  http://hostname/?somevar=1
+
+  Interchange in that case looked for a page called "/?somevar=1".
+
+  Thanks to David Christensen <david at endpoint.com> for the fix.
+
 
 ------------------------------------------------------------------------------
 



1.105                interchange/lib/Vend/Dispatch.pm


rev 1.105, prev_rev 1.104
Index: Dispatch.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Dispatch.pm,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -u -r1.104 -r1.105
--- Dispatch.pm	26 Nov 2008 10:02:46 -0000	1.104
+++ Dispatch.pm	31 Dec 2008 17:46:05 -0000	1.105
@@ -1,6 +1,6 @@
 # Vend::Dispatch - Handle Interchange page requests
 #
-# $Id: Dispatch.pm,v 1.104 2008-11-26 10:02:46 racke Exp $
+# $Id: Dispatch.pm,v 1.105 2008-12-31 17:46:05 jon Exp $
 #
 # Copyright (C) 2002-2008 Interchange Development Group
 # Copyright (C) 2002 Mike Heins <mike at perusion.net>
@@ -26,7 +26,7 @@
 package Vend::Dispatch;
 
 use vars qw($VERSION);
-$VERSION = substr(q$Revision: 1.104 $, 10);
+$VERSION = substr(q$Revision: 1.105 $, 10);
 
 use POSIX qw(strftime);
 use Vend::Util;
@@ -1596,6 +1596,8 @@
 #::logDebug("request_uri=$CGI::request_uri script_path=$CGI::script_path");
         if($CGI::request_uri !~ /^$CGI::script_path/) {
             $Vend::FinalPath = $CGI::request_uri;
+            # remove any trailing query string
+            $Vend::FinalPath =~ s/\?.*//;
 #::logDebug("FinalPath now $CGI::request_uri");
         }
         else {







More information about the interchange-cvs mailing list