aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-06-15 18:35:41 +0200
committerLukas Reschke <lukas@owncloud.com>2015-06-15 18:35:41 +0200
commit34f5541088e99367a8bcdc1ca2ba4fa8524eec68 (patch)
tree2bce13a37e15f7a52415830149b198b001adec52
parent15ba2a41002d0fb72a5a6ee7f3cb129b03acc4e5 (diff)
downloadnextcloud-server-34f5541088e99367a8bcdc1ca2ba4fa8524eec68.tar.gz
nextcloud-server-34f5541088e99367a8bcdc1ca2ba4fa8524eec68.zip
Add `no-store` to AppFramework
-rw-r--r--core/avatar/avatarcontroller.php3
-rw-r--r--lib/public/appframework/http/response.php2
-rw-r--r--tests/lib/appframework/http/ResponseTest.php2
3 files changed, 3 insertions, 4 deletions
diff --git a/core/avatar/avatarcontroller.php b/core/avatar/avatarcontroller.php
index 9eb7069166e..5ddd80c45af 100644
--- a/core/avatar/avatarcontroller.php
+++ b/core/avatar/avatarcontroller.php
@@ -209,8 +209,7 @@ class AvatarController extends Controller {
$resp = new DataDisplayResponse($image->data(),
Http::STATUS_OK,
- ['Content-Type' => $image->mimeType(),
- 'Pragma' => 'public']);
+ ['Content-Type' => $image->mimeType()]);
$resp->setETag(crc32($image->data()));
$resp->cacheFor(0);
diff --git a/lib/public/appframework/http/response.php b/lib/public/appframework/http/response.php
index 8fd5fdd8f53..f6c9460ff15 100644
--- a/lib/public/appframework/http/response.php
+++ b/lib/public/appframework/http/response.php
@@ -94,7 +94,7 @@ class Response {
$this->addHeader('Cache-Control', 'max-age=' . $cacheSeconds .
', must-revalidate');
} else {
- $this->addHeader('Cache-Control', 'no-cache, must-revalidate');
+ $this->addHeader('Cache-Control', 'no-cache, no-store, must-revalidate');
}
return $this;
diff --git a/tests/lib/appframework/http/ResponseTest.php b/tests/lib/appframework/http/ResponseTest.php
index 77e9441b52c..c8b79fbd8b6 100644
--- a/tests/lib/appframework/http/ResponseTest.php
+++ b/tests/lib/appframework/http/ResponseTest.php
@@ -221,7 +221,7 @@ class ResponseTest extends \Test\TestCase {
$this->childResponse->cacheFor(0);
$headers = $this->childResponse->getHeaders();
- $this->assertEquals('no-cache, must-revalidate', $headers['Cache-Control']);
+ $this->assertEquals('no-cache, no-store, must-revalidate', $headers['Cache-Control']);
}