|
|
@@ -41,11 +41,33 @@ class Zend_Amf_Response_Http extends Zend_Amf_Response
|
|
|
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 = $_SERVER['HTTPS'];
|
|
|
+ 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;
|
|
|
+ }
|
|
|
}
|