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

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Wed Feb 15 00:39:54 EST 2006


User:      kwalsh
Date:      2006-02-15 05:39:53 GMT
Modified:  lib/Vend Dispatch.pm
Log:
    * If cookies are switched off in the user's browser and the user
      is just switching from a HTTP page to a HTTPS page then there's
      no reason to re-initialise the session.

Revision  Changes    Path
1.64      +9 -5      interchange/lib/Vend/Dispatch.pm


rev 1.64, prev_rev 1.63
Index: Dispatch.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Dispatch.pm,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- Dispatch.pm	10 Feb 2006 15:02:40 -0000	1.63
+++ Dispatch.pm	15 Feb 2006 05:39:53 -0000	1.64
@@ -1,6 +1,6 @@
 # Vend::Dispatch - Handle Interchange page requests
 #
-# $Id: Dispatch.pm,v 1.63 2006/02/10 15:02:40 jon Exp $
+# $Id: Dispatch.pm,v 1.64 2006/02/15 05:39:53 kwalsh Exp $
 #
 # Copyright (C) 2002-2006 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.63 $, 10);
+$VERSION = substr(q$Revision: 1.64 $, 10);
 
 use POSIX qw(strftime);
 use Vend::Util;
@@ -1309,9 +1309,13 @@
 				# do nothing, no host checking
 			}
 			elsif(! $compare_host) {
-				new_session($seed) unless $CGI::secure;
-				init_session();
-				$Vend::Session->{shost} = $CGI::remote_addr;
+				if ($CGI::secure) {
+				    $Vend::Session->{shost} = $CGI::remote_addr;
+				}
+				else {
+				    new_session($seed);
+				    init_session();
+				}
 			}
 			elsif ($compare_host ne $CGI::remote_addr) {
 				new_session($seed);








More information about the interchange-cvs mailing list