Ejemplo n.º 1
0
 public function getHeader(string $name) : array
 {
     $n = \strtolower($name);
     if ($n === 'host' && empty($this->headers[$n]) && $this->uri !== null) {
         $host = $this->uri->getHost();
         if (!empty($host)) {
             return [$host . ($this->uri->getPort() ? ':' . $this->uri->getPort() : '')];
         }
     }
     return parent::getHeader($name);
 }