protected function Response::ensureIEOverSSLCompatibility

Check if we need to remove Cache-Control for ssl encrypted downloads when using IE < 9

@link http://support.microsoft.com/kb/323308

2 calls to Response::ensureIEOverSSLCompatibility()
BinaryFileResponse::prepare in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php
Prepares the Response before it is sent to the client.
Response::prepare in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php
Prepares the Response before it is sent to the client.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php, line 1180

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

protected function ensureIEOverSSLCompatibility(Request $request) {
  if (false !== stripos($this->headers
    ->get('Content-Disposition'), 'attachment') && preg_match('/MSIE (.*?);/i', $request->server
    ->get('HTTP_USER_AGENT'), $match) == 1 && true === $request
    ->isSecure()) {
    if (intval(preg_replace("/(MSIE )(.*?);/", "\$2", $match[0])) < 9) {
      $this->headers
        ->remove('Cache-Control');
    }
  }
}