Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -327,6 +327,7 @@ |
328 | 328 | when using long urls |
329 | 329 | * The display of the language list on the preferences is more comply with the |
330 | 330 | BCP 47 standards. |
| 331 | +* (bug 19849) Custom X-Vary-Options header now disabled unless $wgUseXVO is set |
331 | 332 | |
332 | 333 | == API changes in 1.16 == |
333 | 334 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1690,6 +1690,9 @@ |
1691 | 1691 | /** If you run Squid3 with ESI support, enable this (default:false): */ |
1692 | 1692 | $wgUseESI = false; |
1693 | 1693 | |
| 1694 | +/** Send X-Vary-Options header for better caching (requires patched Squid) */ |
| 1695 | +$wgUseXVO = false; |
| 1696 | + |
1694 | 1697 | /** Internal server name as known to Squid, if different */ |
1695 | 1698 | # $wgInternalServer = 'http://yourinternal.tld:8000'; |
1696 | 1699 | $wgInternalServer = $wgServer; |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -977,7 +977,7 @@ |
978 | 978 | } |
979 | 979 | |
980 | 980 | public function sendCacheControl() { |
981 | | - global $wgUseSquid, $wgUseESI, $wgUseETag, $wgSquidMaxage, $wgRequest; |
| 981 | + global $wgUseSquid, $wgUseESI, $wgUseETag, $wgSquidMaxage, $wgRequest, $wgUseXVO; |
982 | 982 | |
983 | 983 | $response = $wgRequest->response(); |
984 | 984 | if ($wgUseETag && $this->mETag) |
— | — | @@ -987,8 +987,10 @@ |
988 | 988 | # maintain different caches for logged-in users and non-logged in ones |
989 | 989 | $response->header( 'Vary: Accept-Encoding, Cookie' ); |
990 | 990 | |
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 | + } |
993 | 995 | |
994 | 996 | if( !$this->uncacheableBecauseRequestVars() && $this->mEnableClientCache ) { |
995 | 997 | if( $wgUseSquid && session_id() == '' && |