Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.145.2.6
diff -u -p -r1.145.2.6 bootstrap.inc
--- includes/bootstrap.inc	26 Jul 2007 19:16:45 -0000	1.145.2.6
+++ includes/bootstrap.inc	3 Oct 2007 17:44:30 -0000
@@ -290,6 +290,11 @@ function conf_init() {
       $cookie_domain = check_plain($_SERVER['HTTP_HOST']);
     }
   }
+  if (ini_get('session.cookie_secure')) {
+    // If the user specifies secure session cookies, use different identifiers
+    // for https and http.
+    $session_name .= 'SSL';
+  }
   // Strip leading periods, www., and port numbers from cookie domain.
   $cookie_domain = ltrim($cookie_domain, '.');
   if (strpos($cookie_domain, 'www.') === 0) {
