Skip to content

Commit e89c921

Browse files
Response prepare method update
Response prepare updated for more coherence.
1 parent e1df835 commit e89c921

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/HttpFoundation/Response.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,9 @@ public function prepare(Request $request)
310310
}
311311

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

318318
$this->ensureIEOverSSLCompatibility($request);

0 commit comments

Comments
 (0)