fixed status-header for cache_modified_check under cgi-sapi

This commit is contained in:
messju
2003-08-10 21:27:51 +00:00
parent c80e2d9e4a
commit 180ac79934
2 changed files with 6 additions and 1 deletions

1
NEWS
View File

@@ -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

View File

@@ -1271,7 +1271,11 @@ class Smarty
if (@count($this->_cache_info['insert_tags']) == 0
&& !$this->_cache_serials
&& $_gmt_mtime == $_last_modified_date) {
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;