Skip to content

Commit

Permalink
Response prepare method update
Browse files Browse the repository at this point in the history
Response prepare updated for more coherence.
  • Loading branch information
DamienVauchel committed Mar 21, 2019
1 parent e1df835 commit e89c921
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Symfony/Component/HttpFoundation/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ public function prepare(Request $request)
}

// Check if we need to send extra expire info headers
if ('1.0' == $this->getProtocolVersion() && false !== strpos($this->headers->get('Cache-Control'), 'no-cache')) {
$this->headers->set('pragma', 'no-cache');
$this->headers->set('expires', -1);
if ('1.0' == $this->getProtocolVersion() && false !== strpos($headers->get('Cache-Control'), 'no-cache')) {
$headers->set('pragma', 'no-cache');
$headers->set('expires', -1);
}

$this->ensureIEOverSSLCompatibility($request);
Expand Down

0 comments on commit e89c921

Please sign in to comment.