Properly append port to Host header in HTTPRequest
authorTim Düsterhus <timwolla@googlemail.com>
Mon, 17 Jun 2013 22:27:31 +0000 (01:27 +0300)
committerTim Düsterhus <timwolla@googlemail.com>
Mon, 17 Jun 2013 22:27:31 +0000 (01:27 +0300)
wcfsetup/install/files/lib/util/HTTPRequest.class.php

index 7d07b033eef4eded20a16ab854b8bd78fc013835..f5a946660d47677b2351ed7d006768873b6b2bd3 100644 (file)
@@ -111,7 +111,7 @@ final class HTTPRequest {
                if (isset($this->options['auth'])) {
                        $this->addHeader('Authorization', "Basic ".base64_encode($options['auth']['username'].":".$options['auth']['password']));
                }
-               $this->addHeader('Host', $this->host);
+               $this->addHeader('Host', $this->host.($this->port != ($this->useSSL ? 443 : 80) ? ':'.$this->port : ''));
                $this->addHeader('Connection', 'Close');
        }