8000 ResponseHeaderBag by kriswallsmith · Pull Request #72 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

ResponseHeaderBag #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
3 commits merged into from
Feb 22, 2011
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[HttpKernel] fixed invalid test
According to ResponseHeaderBag::computeCacheControlValue(), a response with an ETag but no explicit Cache-Control header should have a sensible Cache-Control of "private, must-revalidate" set. According to Response::isCacheable(), a response that includes a private Cache-Controls is not considered cacheable. Therefore, in order for this test response to be cacheable and stored, it requires an explicit Cache-Control of public.
  • Loading branch information
kriswallsmith committed Feb 22, 2011
commit 3e131f5b709c5f32d3f1057fe9eb3ad3d1344efd
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public function testValidatesPrivateResponsesCachedOnTheClient()
$response->setContent('private data');
}
} else {
$response->headers->set('Cache-Control', 'public');
$response->setETag('"public tag"');
if (in_array('"public tag"', $etags)) {
$response->setStatusCode(304);
Expand Down
0