From: Mark Bergsma Date: Thu, 24 Aug 2006 15:14:38 +0000 (+0000) Subject: (bug 7098) Add an option to disable/enable sending of HTTP ETag headers, X-Git-Tag: 1.31.0-rc.0~55915 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=8167b89e080afa1dbddbb946d2ed2574fc7a2b15;p=lhc%2Fweb%2Fwiklou.git (bug 7098) Add an option to disable/enable sending of HTTP ETag headers, as it seems to result in broken behaviour in combination with Squid 2.6 (disabled by default). --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8f8d863ba6..2251a8c49a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -20,11 +20,15 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN == Configuration changes == -* None yet! +* $wgUseETag, to enable/disable sending of HTTP ETag headers + (default: disabled) == Major new features == +* (bug 7098) Add an option to disable/enable sending of HTTP ETag headers, + as it seems to result in broken behaviour in combination with Squid 2.6 + (disabled by default). * (bug 550) Allow blocks on anonymous users only. * (bug 6420) Render thumbnails for DJVU images, support multipage DJVU display on image pages. Added new 'page=' thumbnail option to select a page from a diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 43f00ab94c..b6f251534d 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1036,6 +1036,9 @@ $wgFileCacheDirectory = "{$wgUploadDirectory}/cache"; */ $wgUseGzip = false; +/** Whether MediaWiki should send an ETag header */ +$wgUseETag = false; + # Email notification settings # diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b9db67ed60..bfe5bce01f 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -426,10 +426,10 @@ class OutputPage { } function sendCacheControl() { - global $wgUseSquid, $wgUseESI, $wgSquidMaxage, $wgRequest; + global $wgUseSquid, $wgUseESI, $wgUseETag, $wgSquidMaxage, $wgRequest; $fname = 'OutputPage::sendCacheControl'; - if ($this->mETag) + if ($wgUseETag && $this->mETag) $wgRequest->response()->header("ETag: $this->mETag"); # don't serve compressed data to clients who can't handle it