Skip to content

Commit

Permalink
minor #30633 Response prepare method update for more coherence (Damie…
Browse files Browse the repository at this point in the history
…nVauchel)

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
  • Loading branch information
fabpot committed Mar 22, 2019
2 parents e1df835 + e89c921 commit 9ee5248
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Symfony/Component/HttpFoundation/Response.php
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 9ee5248

Please sign in to comment.