瀏覽代碼

Fix for IIS, thanks Bruce Richardson

Thijs Kinkhorst 22 年之前
父節點
當前提交
6deb18e8dc
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      functions/strings.php

+ 3 - 2
functions/strings.php

@@ -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://';