You are here

protected function Response::ensureIEOverSSLCompatibility in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Response.php \Symfony\Component\HttpFoundation\Response::ensureIEOverSSLCompatibility()

Checks 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 vendor/symfony/http-foundation/BinaryFileResponse.php
Prepares the Response before it is sent to the client.
Response::prepare in vendor/symfony/http-foundation/Response.php
Prepares the Response before it is sent to the client.

File

vendor/symfony/http-foundation/Response.php, line 1163

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 ((int) preg_replace('/(MSIE )(.*?);/', '$2', $match[0]) < 9) {
      $this->headers
        ->remove('Cache-Control');
    }
  }
}