From d3ee6dcbc3f4cb62026e9c087561ae878572e096 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 24 Sep 2015 20:54:09 +0200 Subject: [PATCH] Fixup HTTPRequest.class.php This fixes up commit 63f9ff4e0efc619ab8851463bbafe8f44eb72a89. --- wcfsetup/install/files/lib/util/HTTPRequest.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/util/HTTPRequest.class.php b/wcfsetup/install/files/lib/util/HTTPRequest.class.php index 3393441fda..5853c0b7f3 100644 --- a/wcfsetup/install/files/lib/util/HTTPRequest.class.php +++ b/wcfsetup/install/files/lib/util/HTTPRequest.class.php @@ -224,10 +224,6 @@ final class HTTPRequest { $this->originHost = $originUrl['host']; $this->originPort = isset($originUrl['port']) ? $originUrl['port'] : ($this->originUseSSL ? 443 : 80); - if (PROXY_SERVER_HTTP) { - $parsedUrl = parse_url(PROXY_SERVER_HTTP); - } - if (PROXY_SERVER_HTTP && !$this->originUseSSL) { $this->path = $url; } @@ -235,6 +231,10 @@ final class HTTPRequest { $this->path = isset($parsedUrl['path']) ? $parsedUrl['path'] : '/'; } + if (PROXY_SERVER_HTTP) { + $parsedUrl = parse_url(PROXY_SERVER_HTTP); + } + $this->useSSL = $parsedUrl['scheme'] === 'https'; $this->host = $parsedUrl['host']; $this->port = isset($parsedUrl['port']) ? $parsedUrl['port'] : ($this->useSSL ? 443 : 80); -- 2.20.1