Mercurial > SimpleWebPresenter
diff Page.inc @ 91:1d4c980f4255
Change the way headers are set.
Disabled validation for non-html pages.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Thu, 18 Oct 2012 00:28:48 +0200 |
| parents | 7a9c45b53866 |
| children | 8aadd7a23b68 |
line wrap: on
line diff
--- a/Page.inc Wed Oct 17 21:23:02 2012 +0200 +++ b/Page.inc Thu Oct 18 00:28:48 2012 +0200 @@ -18,9 +18,9 @@ $this->content = $content; } - function addHeader($txt) + function setHeader($headername, $value) { - array_push($this->headers, $txt); + $this->headers[$headername] = $value; } function __toString() @@ -160,8 +160,8 @@ function display() { $res = $this->genPage(); - foreach ($res->headers as $header) { - header($header); + foreach ($res->headers as $header => $value) { + header("${header}: ${value}"); } print $res; }
