From 4e03f88ca323696efb2d960ad4741409af01db72 Mon Sep 17 00:00:00 2001
From: Clemens K <github@clemensklug.de>
Date: Mon, 30 May 2016 18:13:07 +0200
Subject: [PATCH] Enable installation in HTTPS-only enviroment (#2033)

---
 wcfsetup/install/files/lib/system/WCFSetup.class.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php
index 3e6307cb34..022de7a2c1 100644
--- a/wcfsetup/install/files/lib/system/WCFSetup.class.php
+++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php
@@ -13,6 +13,7 @@ use wcf\system\io\File;
 use wcf\system\io\Tar;
 use wcf\system\language\LanguageFactory;
 use wcf\system\package\PackageArchive;
+use wcf\system\request\RouteHandler;
 use wcf\system\session\ACPSessionFactory;
 use wcf\system\session\SessionHandler;
 use wcf\system\setup\Installer;
@@ -466,7 +467,7 @@ class WCFSetup extends WCF {
 		
 		// domain
 		$domainName = '';
-		if (!empty($_SERVER['SERVER_NAME'])) $domainName = 'http://' . $_SERVER['SERVER_NAME'];
+		if (!empty($_SERVER['SERVER_NAME'])) $domainName = RouteHandler::getProtocol() . $_SERVER['SERVER_NAME'];
 		// port
 		if (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 80) $domainName .= ':' . $_SERVER['SERVER_PORT'];
 		// script url
-- 
2.20.1