Revision: 53725
Author:   brion
Date:     2009-07-24 20:01:23 +0000 (Fri, 24 Jul 2009)

Log Message:
-----------
* (bug 19849) Custom X-Vary-Options header now disabled unless $wgUseXVO is set

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES
    trunk/phase3/includes/DefaultSettings.php
    trunk/phase3/includes/OutputPage.php

Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES  2009-07-24 19:42:56 UTC (rev 53724)
+++ trunk/phase3/RELEASE-NOTES  2009-07-24 20:01:23 UTC (rev 53725)
@@ -327,6 +327,7 @@
   when using long urls
 * The display of the language list on the preferences is more comply with the 
   BCP 47 standards.
+* (bug 19849) Custom X-Vary-Options header now disabled unless $wgUseXVO is set
 
 == API changes in 1.16 ==
 

Modified: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php   2009-07-24 19:42:56 UTC (rev 
53724)
+++ trunk/phase3/includes/DefaultSettings.php   2009-07-24 20:01:23 UTC (rev 
53725)
@@ -1690,6 +1690,9 @@
 /** If you run Squid3 with ESI support, enable this (default:false): */
 $wgUseESI = false;
 
+/** Send X-Vary-Options header for better caching (requires patched Squid) */
+$wgUseXVO = false;
+
 /** Internal server name as known to Squid, if different */
 # $wgInternalServer = 'http://yourinternal.tld:8000';
 $wgInternalServer = $wgServer;

Modified: trunk/phase3/includes/OutputPage.php
===================================================================
--- trunk/phase3/includes/OutputPage.php        2009-07-24 19:42:56 UTC (rev 
53724)
+++ trunk/phase3/includes/OutputPage.php        2009-07-24 20:01:23 UTC (rev 
53725)
@@ -977,7 +977,7 @@
        }
 
        public function sendCacheControl() {
-               global $wgUseSquid, $wgUseESI, $wgUseETag, $wgSquidMaxage, 
$wgRequest;
+               global $wgUseSquid, $wgUseESI, $wgUseETag, $wgSquidMaxage, 
$wgRequest, $wgUseXVO;
 
                $response = $wgRequest->response();
                if ($wgUseETag && $this->mETag)
@@ -987,8 +987,10 @@
                # maintain different caches for logged-in users and non-logged 
in ones
                $response->header( 'Vary: Accept-Encoding, Cookie' );
 
-               # Add an X-Vary-Options header for Squid with Wikimedia patches
-               $response->header( $this->getXVO() );
+               if ( $wgUseXVO ) {
+                       # Add an X-Vary-Options header for Squid with Wikimedia 
patches
+                       $response->header( $this->getXVO() );
+               }
 
                if( !$this->uncacheableBecauseRequestVars() && 
$this->mEnableClientCache ) {
                        if( $wgUseSquid && session_id() == '' &&



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to