/** * Sends HTTP headers. */ public function sendHeaders() { if (!$this->headers->has('Content-Type')) { $this->headers->set('Content-Type', 'text/html'); } // status header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)); // headers foreach ($this->headers->all() as $name => $values) { foreach ($values as $value) { header($name . ': ' . $value); } } }