From 7b2a2a8300fd4441942dfee906e5ddcce5ba84a8 Mon Sep 17 00:00:00 2001 From: ralph Date: Thu, 22 Nov 2012 16:55:52 -0400 Subject: [PATCH] Adding fix for Bootstrap::SendHeader at set time for a non file. --- gulliver/system/class.bootstrap.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php index 4169c05e7..ded3741cc 100644 --- a/gulliver/system/class.bootstrap.php +++ b/gulliver/system/class.bootstrap.php @@ -397,7 +397,7 @@ class Bootstrap break; case 'php': if ($download) { - G::sendHeaders( $filename, 'text/plain', $download, $downloadFileName ); + Bootstrap::sendHeaders( $filename, 'text/plain', $download, $downloadFileName ); } else { require_once ($filename); return; @@ -1101,7 +1101,11 @@ class Bootstrap // if ( ereg("msie", $userAgent)) { header ( 'Pragma: cache' ); - $mtime = filemtime ( $filename ); + if (file_exists ( $filename )) { + $mtime = filemtime ( $filename ); + } else { + $mtime = date ( 'U' ); + } $gmt_mtime = gmdate ( "D, d M Y H:i:s", $mtime ) . " GMT"; header ( 'ETag: "' . md5 ( $mtime . $filename ) . '"' ); header ( "Last-Modified: " . $gmt_mtime );