Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.145.2.4
diff -u -p -r1.145.2.4 bootstrap.inc
--- includes/bootstrap.inc	9 Jul 2007 04:28:12 -0000	1.145.2.4
+++ includes/bootstrap.inc	25 Jul 2007 15:58:58 -0000
@@ -275,8 +275,9 @@ function conf_init() {
     $session_name = $cookie_domain;
   }
   else {
-    // Otherwise use $base_url for session name.
-    $session_name = $base_url;
+    // Otherwise use $base_url as session name, without the protocol
+    // to use the same session identifiers across http and https.
+    list( , $session_name) = explode('://', $base_url, 2);
     // We try to set the cookie domain to the hostname.
     if (!empty($_SERVER['HTTP_HOST'])) {
       $cookie_domain = $_SERVER['HTTP_HOST'];
