(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).
This commit is contained in:
Mark Bergsma 2006-08-24 15:14:38 +00:00
parent 51e44c9f4c
commit 8167b89e08
3 changed files with 10 additions and 3 deletions

View file

@ -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

View file

@ -1036,6 +1036,9 @@ $wgFileCacheDirectory = "{$wgUploadDirectory}/cache";
*/
$wgUseGzip = false;
/** Whether MediaWiki should send an ETag header */
$wgUseETag = false;
# Email notification settings
#

View file

@ -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