/**
  * {@inheritdoc}
  */
 public function isSecure()
 {
     if (self::$trustedProxies && self::$trustedHeaders[self::HEADER_CLIENT_PROTO] && ($proto = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO])->getValueString())) {
         return in_array(strtolower(current(explode(',', $proto))), array('https', 'on', 'ssl', '1'));
     }
     $https = $this->server['HTTPS'];
     return !empty($https) && strtolower($https) !== 'off';
 }
 /**
  * Checks if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9.
  *
  * @link http://support.microsoft.com/kb/323308
  */
 protected function ensureIEOverSSLCompatibility(Request $request)
 {
     $server_info = $request->getServer();
     if (stripos($this->headers->get('Content-Disposition')->getValueString(), 'attachment') !== FALSE && preg_match('/MSIE (.*?);/i', $server_info['HTTP_USER_AGENT'], $match) == 1 && $request->isSecure() === TRUE) {
         if (intval(preg_replace("/(MSIE )(.*?);/", "\$2", $match[0])) < 9) {
             $this->headers->remove('Cache-Control');
         }
     }
 }