Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1628 from DaSourcerer/http-caching

Fix for CHttpCacheFilter's Cache-Control headers being overwritten by started sessions
commit 446bb674c23e5187bbdcfe018808428048f7008f 2 parents 0d0be7e + 93d109a
Alexander Makarov samdark authored
Showing with 7 additions and 1 deletion.
  1. +1 −0  CHANGELOG
  2. +6 −1 framework/web/filters/CHttpCacheFilter.php
1  CHANGELOG
View
@@ -31,6 +31,7 @@ Version 1.1.13 work in progress
- Bug #1584: Fixed CGridView and CListView urls when enableHistory was used with "path" urlFormat (mdomba)
- Bug #1622: CLocale::getTerritory() used to return invalid territory name when locales (language tags) were specified without territory part (e.g. 'de', 'fr') (resurtm)
- Bug #1624: Requirements page now tries all other preferred languages when the most preferred one is missing (ArtVal)
+- Bug #1628: Active HTTP sessions overwrote the Cache-Control header set by CHttpCacheFilter (DaSourcerer)
- Bug #1646: CLocale::getTerritory() used to return invalid territory name when locales (language tags) were specified with script part (e.g. 'zh-Hans-CN', 'zh-Hant-HK') (resurtm)
- Bug #1652: Fixed incorrect syntax of CDbSchema::renameTable() for SQLite, added CSqliteSchema::renameTable() method (Sarke)
- Bug #1676: Fixed listData() grouping when no group was specified (mdomba)
7 framework/web/filters/CHttpCacheFilter.php
View
@@ -181,7 +181,12 @@ protected function send304Header()
*/
protected function sendCacheControlHeader()
{
- header('Cache-Control: '.$this->cacheControl, true);
+ if(Yii::app()->session->isStarted)
+ {
+ session_cache_limiter('public');
+ header('Pragma:',true);
+ }
+ header('Cache-Control: '.$this->cacheControl,true);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.