Fix for IIS, thanks Bruce Richardson
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 20 Dec 2002 11:35:48 +0000 (11:35 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 20 Dec 2002 11:35:48 +0000 (11:35 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4288 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/strings.php

index b0c29df014c252aa7aa24376248c11306e06899d..1b62cffb83de7da77cea38f49126a14ae4fdf65a 100644 (file)
@@ -194,12 +194,13 @@ function get_location () {
     
     /*
      * If you have 'SSLOptions +StdEnvVars' in your apache config
-     *     OR if you have HTTPS in your HTTP_SERVER_VARS
+     *     OR if you have HTTPS=on in your HTTP_SERVER_VARS
      *     OR if you are on port 443
      */
     $getEnvVar = getenv('HTTPS');
     if ((isset($getEnvVar) && !strcasecmp($getEnvVar, 'on')) ||
-        (isset($_SERVER['HTTPS'])) ||
+        (isset($_SERVER['HTTPS']) &&
+         !strcasecmp($_SERVER['HTTPS'], 'on')) ||
         (isset($_SERVER['SERVER_PORT']) &&
          $_SERVER['SERVER_PORT'] == 443)) {
         $proto = 'https://';