code: protected function getHostLine()
      {
          $line = 'Host: ' . $this->url->getHost();
          if ($this->url->getPort()) {
              $line .= ':' . $this->url->getPort();
          }
  
          return $line;
      }
docs: Creates the host part of the request.
  
  @return string          Host line content.