CHttpCacheFilter failed to comply with RFC 2616 #1217

Merged
merged 3 commits into from Aug 13, 2012
Jump to file or symbol
Failed to load files and symbols.
+4 −3
Split
View
@@ -14,6 +14,7 @@ Version 1.1.12 work in progress
- Bug #1094: CGridView with enabled history used to clear page title in case sorting or paging performed (Opera and Firefox only) (resurtm)
- Bug #1109: Fixed "js:" encoding BC-break in CHtml::ajax() and related methods introduced in 1.1.11 (samdark)
- Bug #1120: Fixed duplicate events processing in CGridView when ENTER was pressed for filtering (mdomba)
+- Bug #1192: CHttpCacheFilter failed to comply with RFC 2616, section 10.3.5 (DaSourcerer)
- Enh #243: CWebService is now able to deal with the customized WSDL generator classes, was hardcoded to the CWsdlGenerator before, added CWebService::$generatorConfig property (resurtm)
- Enh #636: CManyManyRelation now parses foreign key for the junction table data internally, and provide public interface to access it (klimov-paul)
- Chg #1099: Changed connectionId dropdown to sticky text field in Gii model generator (mdomba)
@@ -64,6 +64,9 @@ public function preFilter($filterChain)
if($etag===false&&$lastModified===false)
return true;
+ if($etag)
+ header('ETag: '.$etag);
+
if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])&&isset($_SERVER['HTTP_IF_NONE_MATCH']))
{
if($this->checkLastModified($lastModified)&&$this->checkEtag($etag))
@@ -96,9 +99,6 @@ public function preFilter($filterChain)
if($lastModified)
header('Last-Modified: '.date('r', $lastModified));
- if($etag)
- header('ETag: '.$etag);
-
$this->sendCacheControlHeader();
return true;
}