]> git.mxchange.org Git - shipsimu.git/commitdiff
Parser error fixed and header output rewritten
authorRoland Häder <roland@mxchange.org>
Thu, 15 May 2008 19:51:18 +0000 (19:51 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 15 May 2008 19:51:18 +0000 (19:51 +0000)
inc/classes/main/response/class_HttpResponse.php

index dea248185cd33cf0e886768c13ad1a8000ba67e7..8172191acf66aedd2b36cacce1658213a4b82c00 100644 (file)
@@ -134,16 +134,13 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
                        $now = gmdate('D, d M Y H:i:s') . ' GMT';
 
                        // General header for no caching
-                       header('Expires: ' . $now); // rfc2616 - Section 14.21
-                       header('Last-Modified: ' . $now);
-                       header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
-                       header('Pragma: no-cache'); // HTTP/1.0
-
-                       // whether to show html header?
-                       if ($action != 'download') {
+                       $this->addHeader('Expired', $now); // rfc2616 - Section 14.21
+                       $this->addHeader('Last-Modified', $now);
+                       $this->addHeader('Cache-Control:', 'no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
+                       $this->addHeader('Pragma:', 'no-cache'); // HTTP/1.0
 
                        // Define the charset to be used
-                       header('Content-Type: text/html; charset=utf-8');
+                       $this->addHeader('Content-Type:', 'text/html; charset=utf-8');
 
                        foreach ($this->responseHeaders as $name=>$value) {
                                header("{$name}: {$value}");