[Pkg-owncloud-commits] [owncloud] 422/457: Add `no-store` to AppFramework

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:07:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 34f5541088e99367a8bcdc1ca2ba4fa8524eec68
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Mon Jun 15 18:35:41 2015 +0200

    Add `no-store` to AppFramework
---
 core/avatar/avatarcontroller.php             | 3 +--
 lib/public/appframework/http/response.php    | 2 +-
 tests/lib/appframework/http/ResponseTest.php | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/core/avatar/avatarcontroller.php b/core/avatar/avatarcontroller.php
index 9eb7069..5ddd80c 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 8fd5fdd..f6c9460 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 77e9441..c8b79fb 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']);
 	}
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list