diff -r 5e7a0fedabdf -r 877f952ae2bd web/lib/Zend/Amf/Response/Http.php --- a/web/lib/Zend/Amf/Response/Http.php Thu Mar 21 17:31:31 2013 +0100 +++ b/web/lib/Zend/Amf/Response/Http.php Thu Mar 21 19:50:53 2013 +0100 @@ -15,9 +15,9 @@ * @category Zend * @package Zend_Amf * @subpackage Response - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Http.php 22096 2010-05-04 15:37:23Z wadearnold $ + * @version $Id: Http.php 24593 2012-01-05 20:35:02Z matthew $ */ /** Zend_Amf_Response */ @@ -28,7 +28,7 @@ * * @package Zend_Amf * @subpackage Response - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Amf_Response_Http extends Zend_Amf_Response @@ -41,11 +41,33 @@ public function getResponse() { if (!headers_sent()) { - header('Cache-Control: no-cache, must-revalidate'); + if ($this->isIeOverSsl()) { + header('Cache-Control: cache, must-revalidate'); + header('Pragma: public'); + } else { + header('Cache-Control: no-cache, must-revalidate'); + header('Pragma: no-cache'); + } header('Expires: Thu, 19 Nov 1981 08:52:00 GMT'); - header('Pragma: no-cache'); header('Content-Type: application/x-amf'); } return parent::getResponse(); } + + protected function isIeOverSsl() + { + $ssl = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : false; + if (!$ssl || ($ssl == 'off')) { + // IIS reports "off", whereas other browsers simply don't populate + return false; + } + + $ua = $_SERVER['HTTP_USER_AGENT']; + if (!preg_match('/; MSIE \d+\.\d+;/', $ua)) { + // Not MicroSoft Internet Explorer + return false; + } + + return true; + } }