r53725 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53724‎ | r53725 | r53726 >
Date:20:01, 24 July 2009
Author:brion
Status:ok
Tags:
Comment:
* (bug 19849) Custom X-Vary-Options header now disabled unless $wgUseXVO is set
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES
@@ -327,6 +327,7 @@
328328 when using long urls
329329 * The display of the language list on the preferences is more comply with the
330330 BCP 47 standards.
 331+* (bug 19849) Custom X-Vary-Options header now disabled unless $wgUseXVO is set
331332
332333 == API changes in 1.16 ==
333334
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1690,6 +1690,9 @@
16911691 /** If you run Squid3 with ESI support, enable this (default:false): */
16921692 $wgUseESI = false;
16931693
 1694+/** Send X-Vary-Options header for better caching (requires patched Squid) */
 1695+$wgUseXVO = false;
 1696+
16941697 /** Internal server name as known to Squid, if different */
16951698 # $wgInternalServer = 'http://yourinternal.tld:8000';
16961699 $wgInternalServer = $wgServer;
Index: trunk/phase3/includes/OutputPage.php
@@ -977,7 +977,7 @@
978978 }
979979
980980 public function sendCacheControl() {
981 - global $wgUseSquid, $wgUseESI, $wgUseETag, $wgSquidMaxage, $wgRequest;
 981+ global $wgUseSquid, $wgUseESI, $wgUseETag, $wgSquidMaxage, $wgRequest, $wgUseXVO;
982982
983983 $response = $wgRequest->response();
984984 if ($wgUseETag && $this->mETag)
@@ -987,8 +987,10 @@
988988 # maintain different caches for logged-in users and non-logged in ones
989989 $response->header( 'Vary: Accept-Encoding, Cookie' );
990990
991 - # Add an X-Vary-Options header for Squid with Wikimedia patches
992 - $response->header( $this->getXVO() );
 991+ if ( $wgUseXVO ) {
 992+ # Add an X-Vary-Options header for Squid with Wikimedia patches
 993+ $response->header( $this->getXVO() );
 994+ }
993995
994996 if( !$this->uncacheableBecauseRequestVars() && $this->mEnableClientCache ) {
995997 if( $wgUseSquid && session_id() == '' &&

Status & tagging log