diff --git a/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php b/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php index ff1c791f7..aea0cd827 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php @@ -1079,9 +1079,15 @@ class ObjectController extends BrickController if ($iCacheSec > 0) { $aHeaders['Expires'] = ''; - $aHeaders['Cache-Control'] = 'no-transform, public,max-age='.$iCacheSec.',s-maxage='.$iCacheSec; + $aHeaders['Cache-Control'] = 'no-tranjsform, public,max-age='.$iCacheSec.',s-maxage='.$iCacheSec; // Reset the value set previously $aHeaders['Pragma'] = 'cache'; + + // Fix bug in Symphony 3x in Response::sendHeaders() : don't replace header of page except Content-Type + header('Cache-Control: no-transform, public,max-age='.$iCacheSec.',s-maxage='.$iCacheSec); + header('Pragma: cache'); + header('Expires: '); + // An arbitrary date in the past is ok $aHeaders['Last-Modified'] = 'Wed, 15 Jun 2015 13:21:15 GMT'; } diff --git a/pages/ajax.render.php b/pages/ajax.render.php index 345e7e1ac..deb9e2f12 100644 --- a/pages/ajax.render.php +++ b/pages/ajax.render.php @@ -757,6 +757,9 @@ try // See TRAC #363, fix described here: http://forums.codecharge.com/posts.php?post_id=97771 $oPage->add_header("Cache-Control: cache, must-revalidate"); $oPage->add_header("Pragma: public"); + // Fix bug in Symphony 3x in Response::sendHeaders() : don't replace header of page except Content-Type + header("Cache-Control: cache, must-revalidate"); + header("Pragma: public"); $oPage->add_header("Expires: Fri, 17 Jul 1970 05:00:00 GMT"); $aParams = utils::ReadParam('params', array(), false, 'raw_data'); diff --git a/sources/application/WebPage/WebPage.php b/sources/application/WebPage/WebPage.php index e2c6f10ce..6d0c1d8e1 100644 --- a/sources/application/WebPage/WebPage.php +++ b/sources/application/WebPage/WebPage.php @@ -902,6 +902,11 @@ JS; $this->add_header('Cache-control: no-cache, no-store, must-revalidate'); $this->add_header('Pragma: no-cache'); $this->add_header('Expires: 0'); + + // Fix bug in Symphony 3x in Response::sendHeaders() : don't replace header of page except Content-Type + header('Cache-control: no-cache, no-store, must-revalidate'); + header('Pragma: no-cache'); + header('Expires: 0'); } public function set_cache($iCacheSec) @@ -909,6 +914,11 @@ JS; $this->add_header("Cache-Control: max-age=$iCacheSec"); $this->add_header("Pragma: cache"); $this->add_header("Expires: "); + + // Fix bug in Symphony 3x in Response::sendHeaders() : don't replace header of page except Content-Type + header("Cache-Control: max-age=$iCacheSec"); + header('Pragma: cache'); + header('Expires: '); } /**