You are here

protected function Response::ensureIEOverSSLCompatibility in RESTful 7.2

Checks if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9.

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

1 call to Response::ensureIEOverSSLCompatibility()
Response::prepare in src/Http/Response.php
Prepares the Response before it is sent to the client.

File

src/Http/Response.php, line 365
Contains \Drupal\restful\Http\Response.

Class

Response

Namespace

Drupal\restful\Http

Code

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');
    }
  }
}