mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
fixed status-header for cache_modified_check under cgi-sapi
This commit is contained in:
1
NEWS
1
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
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user