mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +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
|
- added optional parameter $cache_attrs to register_function() and
|
||||||
register_block(). $cache_attrs is an array containing attribute-
|
register_block(). $cache_attrs is an array containing attribute-
|
||||||
names that should be cached on calls to functions that have
|
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
|
if (@count($this->_cache_info['insert_tags']) == 0
|
||||||
&& !$this->_cache_serials
|
&& !$this->_cache_serials
|
||||||
&& $_gmt_mtime == $_last_modified_date) {
|
&& $_gmt_mtime == $_last_modified_date) {
|
||||||
|
if (php_sapi_name()=='cgi')
|
||||||
|
header("Status: 304 Not Modified");
|
||||||
|
else
|
||||||
header("HTTP/1.1 304 Not Modified");
|
header("HTTP/1.1 304 Not Modified");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
header("Last-Modified: ".$_gmt_mtime);
|
header("Last-Modified: ".$_gmt_mtime);
|
||||||
echo $_smarty_results;
|
echo $_smarty_results;
|
||||||
|
Reference in New Issue
Block a user