Fixup HTTPRequest.class.php
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 24 Sep 2015 18:54:09 +0000 (20:54 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 24 Sep 2015 18:54:09 +0000 (20:54 +0200)
This fixes up commit 63f9ff4e0efc619ab8851463bbafe8f44eb72a89.

wcfsetup/install/files/lib/util/HTTPRequest.class.php

index 3393441fda36b993d5e752463829cfed47d3e0fa..5853c0b7f35059bf5a3fe4c3afbfcb7a64e49a9b 100644 (file)
@@ -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);