Skip to content

Commit

Permalink
Merge pull request #1628 from DaSourcerer/http-caching
Browse files Browse the repository at this point in the history
Fix for CHttpCacheFilter's Cache-Control headers being overwritten by started sessions
  • Loading branch information
samdark committed Nov 10, 2012
2 parents 0d0be7e + 93d109a commit 446bb67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -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 #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 #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 #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 #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 #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) - Bug #1676: Fixed listData() grouping when no group was specified (mdomba)
Expand Down
7 changes: 6 additions & 1 deletion framework/web/filters/CHttpCacheFilter.php
Expand Up @@ -181,7 +181,12 @@ protected function send304Header()
*/ */
protected function sendCacheControlHeader() 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);
} }


/** /**
Expand Down

0 comments on commit 446bb67

Please sign in to comment.