From 92c8bb4197cf934a96c2420e5c9f0509d04bb1e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 15 May 2008 19:51:18 +0000 Subject: [PATCH] Parser error fixed and header output rewritten --- inc/classes/main/response/class_HttpResponse.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/inc/classes/main/response/class_HttpResponse.php b/inc/classes/main/response/class_HttpResponse.php index dea2481..8172191 100644 --- a/inc/classes/main/response/class_HttpResponse.php +++ b/inc/classes/main/response/class_HttpResponse.php @@ -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}"); -- 2.39.5