summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-foundation/ResponseHeaderBag.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-foundation/ResponseHeaderBag.php')
-rw-r--r--vendor/symfony/http-foundation/ResponseHeaderBag.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/vendor/symfony/http-foundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/ResponseHeaderBag.php
index 9e07221933..cf44d0eceb 100644
--- a/vendor/symfony/http-foundation/ResponseHeaderBag.php
+++ b/vendor/symfony/http-foundation/ResponseHeaderBag.php
@@ -122,8 +122,7 @@ class ResponseHeaderBag extends HeaderBag
parent::set($key, $values, $replace);
// ensure the cache-control header has sensible defaults
- if (\in_array($uniqueKey, ['cache-control', 'etag', 'last-modified', 'expires'], true)) {
- $computed = $this->computeCacheControlValue();
+ if (\in_array($uniqueKey, ['cache-control', 'etag', 'last-modified', 'expires'], true) && '' !== $computed = $this->computeCacheControlValue()) {
$this->headers['cache-control'] = [$computed];
$this->headerNames['cache-control'] = 'Cache-Control';
$this->computedCacheControl = $this->parseCacheControl($computed);