Skip to content

Commit 9ee5248

Browse files
committed
minor symfony#30633 Response prepare method update for more coherence (DamienVauchel)
This PR was merged into the 3.4 branch. Discussion ---------- Response prepare method update for more coherence $headers has been defined to avoid using $this->headers and is used everywhere but not in these lines. | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT Commits ------- e89c921 Response prepare method update
2 parents e1df835 + e89c921 commit 9ee5248

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)