diff --git a/NEWS b/NEWS index 73ba8a62..fb206083 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - fixed status-header for cache_modified_check under cgi-sapi (messju) - added optional parameter $cache_attrs to register_function() and register_block(). $cache_attrs is an array containing attribute- names that should be cached on calls to functions that have diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 229969ec..53db8d92 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1271,7 +1271,11 @@ class Smarty if (@count($this->_cache_info['insert_tags']) == 0 && !$this->_cache_serials && $_gmt_mtime == $_last_modified_date) { - header("HTTP/1.1 304 Not Modified"); + if (php_sapi_name()=='cgi') + header("Status: 304 Not Modified"); + else + header("HTTP/1.1 304 Not Modified"); + } else { header("Last-Modified: ".$_gmt_mtime); echo $_smarty_results;