From 42f36d6011b8e63724a6fd9097cfb3c40f705635 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 13 Sep 2006 19:30:12 +0000 Subject: [PATCH] * Set Vary: Cookie on action=raw generated CSS and JS, to ensure that user preferences don't get stuck in proxy caches for other people Man this one's embarassing, we should have fixed it ages ago. This should I think fix the longtime problem where people sometimes see things like underlining of links change spontaneously. --- RELEASE-NOTES | 2 ++ includes/RawPage.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index aa360abca6..0d83d14ba2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -202,6 +202,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 7312) Don't emit SET NAMES utf8 if connection failed * (bug 7305) Proper compare for bot check on RC notify, should fix overrides that force edits by non-bot users to bot mode +* Set Vary: Cookie on action=raw generated CSS and JS, to ensure that user + preferences don't get stuck in proxy caches for other people == Languages updated == diff --git a/includes/RawPage.php b/includes/RawPage.php index 480c0328ad..1a6d6ef78d 100644 --- a/includes/RawPage.php +++ b/includes/RawPage.php @@ -134,8 +134,10 @@ class RawPage { } function getRawText() { - global $wgUser, $wgOut; + global $wgUser, $wgOut, $wgRequest; if($this->mGen) { + // May contain user-specific data; vary for open sessions + $wgRequest->response()->header( 'Vary: Accept-Encoding, Cookie' ); $sk = $wgUser->getSkin(); $sk->initPage($wgOut); if($this->mGen == 'css') { -- 2.20.1