Index: webserver_auth.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webserver_auth/Attic/webserver_auth.module,v
retrieving revision 1.22.2.1
diff -u -p -r1.22.2.1 webserver_auth.module
--- webserver_auth.module	7 Aug 2008 16:38:49 -0000	1.22.2.1
+++ webserver_auth.module	29 Jul 2009 12:07:01 -0000
@@ -87,9 +87,11 @@ function webserver_auth_user($op, &$edit
     }
   }
   elseif ($op == 'logout') {
-    global $base_url;
-    // kick user out of a secure session so they aren't automatically logged back in
-    $base_url = str_replace('https://', 'http://', $base_url);
+    if (variable_get('webserver_auth_enable_https_kickout', TRUE)) {
+      global $base_url;
+      // kick user out of a secure session so they aren't automatically logged back in
+      $base_url = str_replace('https://', 'http://', $base_url);
+    }
   }
 }
 
@@ -122,6 +124,12 @@ function webserver_auth_settings() {
       '#default_value' => variable_get('webserver_auth_strip_domain', TRUE),
       '#description' => t("Strip a domain name (e.g. '@EXAMPLE.COM') from the login name ('newuser@EXAMPLE.COM') to generate the username ('newuser')."),
     ),
+    'webserver_auth_enable_https_kickout' => array(
+      '#type' => 'checkbox',
+      '#title' => t('Enable automatic HTTPS kickout'),
+      '#default_value' => variable_get('webserver_auth_enable_https_kickout', TRUE),
+      '#description' => t("Automatically redirect from HTTPS to HTTP when user logs out."),
+    ),
     'webserver_auth_insert' => array(
       '#type' => 'textarea',
       '#title' => 'User account modification',
