Attempt to make autoconfig more robust wrt to port, a=chris

Chris Pollett [2015-12-15 19:Dec:th]
Attempt to make autoconfig more robust wrt to port, a=chris
Filename
src/controllers/components/SystemComponent.php
diff --git a/src/controllers/components/SystemComponent.php b/src/controllers/components/SystemComponent.php
index 592b2b046..00fa0f4dd 100755
--- a/src/controllers/components/SystemComponent.php
+++ b/src/controllers/components/SystemComponent.php
@@ -1006,10 +1006,7 @@ EOD;
                         $data['USER_AGENT_SHORT'] =
                             $profile['USER_AGENT_SHORT'];
                         $uri = UrlParser::getPath($_SERVER['REQUEST_URI']);
-                        $http = (isset($_SERVER['HTTPS'])) ? "https://" :
-                            "http://";
-                        $profile['NAME_SERVER'] =
-                            $http . $_SERVER['SERVER_NAME'] . $uri;
+                        $profile['NAME_SERVER'] = C\BASE_URL . $uri;
                         $data['NAME_SERVER'] = $profile['NAME_SERVER'];
                         $profile['AUTH_KEY'] = L\crawlHash(
                             $data['WORK_DIRECTORY'].time());
ViewGit