Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.208
diff -u -p -r1.208 bootstrap.inc
--- includes/bootstrap.inc	14 Apr 2008 17:48:33 -0000	1.208
+++ includes/bootstrap.inc	25 Apr 2008 18:54:27 -0000
@@ -324,6 +324,12 @@ function conf_init() {
       $cookie_domain = check_plain($_SERVER['HTTP_HOST']);
     }
   }
+  // If the user specifies secure session cookies, the browser will use two
+  // different cookies for HTTPS and HTTP. To prevent a cookie collision,
+  // we use different session identifiers for HTTPS and HTTP.
+  if (ini_get('session.cookie_secure')) {
+    $session_name .= 'SSL';
+  }
   // Strip leading periods, www., and port numbers from cookie domain.
   $cookie_domain = ltrim($cookie_domain, '.');
   if (strpos($cookie_domain, 'www.') === 0) {
