protected function TRACE() { $this->Response->setStatusCode(200); $headers_string = ''; foreach ($this->Request->getHeaders() as $header => $value) { if (substr($header, 0, 5) === 'HTTP_') { $header = substr($header, 5); } $header = str_replace('_', '-', $header); $headers_string .= ucwords($header) . ': ' . $value . "\r\n"; } $this->Response->setBody($headers_string); }
/** * @param \Jamm\HTTP\IResponse $Response */ public function fillResponse(\Jamm\HTTP\IResponse $Response) { $Response->setStatusCode(404); $Response->setBody('<html><body>Oops. Can not find page.</body></html>'); }