[interchange-cvs] interchange - jon modified lib/Vend/Dispatch.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Fri Apr 9 16:40:19 EDT 2004


User:      jon
Date:      2004-04-09 20:40:18 GMT
Modified:  lib/Vend Dispatch.pm
Log:
Add handling for new special CGI parameter mv_force_session, a boolean.
When set, it reverses the precedence of cookie over CGI (the default
and historically the only option) to CGI over cookie when determining
which session ID to use.

This is useful when sharing sessions between catalogs on different
domains but the user has already got a valid cookie for a session
on the domain you're sending them to and you want to override it with
mv_session_id.

Revision  Changes    Path
1.37      +5 -2      interchange/lib/Vend/Dispatch.pm


rev 1.37, prev_rev 1.36
Index: Dispatch.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Dispatch.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -u -r1.36 -r1.37
--- Dispatch.pm	7 Mar 2004 03:14:41 -0000	1.36
+++ Dispatch.pm	9 Apr 2004 20:40:18 -0000	1.37
@@ -1,6 +1,6 @@
 # Vend::Dispatch - Handle Interchange page requests
 #
-# $Id: Dispatch.pm,v 1.36 2004/03/07 03:14:41 mheins Exp $
+# $Id: Dispatch.pm,v 1.37 2004/04/09 20:40:18 jon Exp $
 #
 # Copyright (C) 2002-2003 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.36 $, 10);
+$VERSION = substr(q$Revision: 1.37 $, 10);
 
 use POSIX qw(strftime);
 use Vend::Util;
@@ -1129,6 +1129,9 @@
 		$Vend::Cookie = 1;
 		$Vend::Cfg->{ScratchDefault}{mv_no_count} = 1;
 		$Vend::Cfg->{ScratchDefault}{mv_no_session_id} = 1;
+	}
+	elsif ($sessionid and $CGI::values{mv_force_session}) {
+		# do nothing
 	}
 	elsif ($::Instance->{CookieName} and defined $CGI::cookie) {
 		$CGI::cookie =~ m{$::Instance->{CookieName}=($Vend::Cfg->{CookiePattern})};








More information about the interchange-cvs mailing list