From: Tim Düsterhus Date: Thu, 24 Sep 2015 18:54:09 +0000 (+0200) Subject: Fixup HTTPRequest.class.php X-Git-Tag: 2.1.8~38 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3ee6dcbc3f4cb62026e9c087561ae878572e096;p=GitHub%2FWoltLab%2FWCF.git Fixup HTTPRequest.class.php This fixes up commit 63f9ff4e0efc619ab8851463bbafe8f44eb72a89. --- 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);