From: Tim Düsterhus Date: Mon, 17 Jun 2013 22:27:31 +0000 (+0300) Subject: Properly append port to Host header in HTTPRequest X-Git-Tag: 2.0.0_Beta_4~22 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aaa3ef884e7c9b843f46ac9b95f22fab79aaddda;p=GitHub%2FWoltLab%2FWCF.git Properly append port to Host header in HTTPRequest --- diff --git a/wcfsetup/install/files/lib/util/HTTPRequest.class.php b/wcfsetup/install/files/lib/util/HTTPRequest.class.php index 7d07b033ee..f5a946660d 100644 --- a/wcfsetup/install/files/lib/util/HTTPRequest.class.php +++ b/wcfsetup/install/files/lib/util/HTTPRequest.class.php @@ -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'); }