Index: branches/wmf/1.17wmf1/includes/Feed.php |
— | — | @@ -222,13 +222,13 @@ |
223 | 223 | * but can also be called separately. |
224 | 224 | */ |
225 | 225 | public function httpHeaders() { |
226 | | - global $wgOut, $wgVaryOnXFPForAPI; |
| 226 | + global $wgOut, $wgVaryOnXFP; |
227 | 227 | |
228 | 228 | # We take over from $wgOut, excepting its cache header info |
229 | 229 | $wgOut->disable(); |
230 | 230 | $mimetype = $this->contentType(); |
231 | 231 | header( "Content-type: $mimetype; charset=UTF-8" ); |
232 | | - if ( $wgVaryOnXFPForAPI ) { |
| 232 | + if ( $wgVaryOnXFP ) { |
233 | 233 | $wgOut->addVaryHeader( 'X-Forwarded-Proto' ); |
234 | 234 | } |
235 | 235 | $wgOut->sendCacheControl(); |
Index: branches/wmf/1.17wmf1/includes/OutputPage.php |
— | — | @@ -1642,7 +1642,7 @@ |
1643 | 1643 | */ |
1644 | 1644 | public function output() { |
1645 | 1645 | global $wgUser, $wgOutputEncoding, $wgRequest; |
1646 | | - global $wgLanguageCode, $wgDebugRedirects, $wgMimeType; |
| 1646 | + global $wgLanguageCode, $wgDebugRedirects, $wgMimeType, $wgVaryOnXFP; |
1647 | 1647 | global $wgUseAjax, $wgAjaxWatch; |
1648 | 1648 | global $wgEnableMWSuggest, $wgUniversalEditButton; |
1649 | 1649 | global $wgArticle; |
— | — | @@ -1661,6 +1661,9 @@ |
1662 | 1662 | } |
1663 | 1663 | $this->mLastModified = wfTimestamp( TS_RFC2822 ); |
1664 | 1664 | } |
| 1665 | + if ( $wgVaryOnXFP ) { |
| 1666 | + $this->addVaryHeader( 'X-Forwarded-Proto' ); |
| 1667 | + } |
1665 | 1668 | $this->sendCacheControl(); |
1666 | 1669 | |
1667 | 1670 | $wgRequest->response()->header( "Content-Type: text/html; charset=utf-8" ); |
Property changes on: branches/wmf/1.17wmf1/includes/OutputPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1668 | 1671 | Merged /trunk/phase3/includes/OutputPage.php:r98755 |
Index: branches/wmf/1.17wmf1/includes/api/ApiMain.php |
— | — | @@ -381,17 +381,17 @@ |
382 | 382 | } |
383 | 383 | |
384 | 384 | protected function sendCacheHeaders() { |
385 | | - global $wgUseXVO, $wgOut, $wgVaryOnXFPForAPI; |
| 385 | + global $wgUseXVO, $wgOut, $wgVaryOnXFP; |
386 | 386 | if ( $this->mCacheMode == 'private' ) { |
387 | 387 | header( 'Cache-Control: private' ); |
388 | 388 | return; |
389 | 389 | } |
390 | 390 | |
391 | 391 | if ( $this->mCacheMode == 'anon-public-user-private' ) { |
392 | | - $xfp = $wgVaryOnXFPForAPI ? ', X-Forwarded-Proto' : ''; |
| 392 | + $xfp = $wgVaryOnXFP ? ', X-Forwarded-Proto' : ''; |
393 | 393 | header( 'Vary: Accept-Encoding, Cookie' . $xfp ); |
394 | 394 | if ( $wgUseXVO ) { |
395 | | - if ( $wgVaryOnXFPForAPI ) { |
| 395 | + if ( $wgVaryOnXFP ) { |
396 | 396 | $wgOut->addVaryHeader( 'X-Forwarded-Proto' ); |
397 | 397 | } |
398 | 398 | header( $wgOut->getXVO() ); |
— | — | @@ -410,7 +410,7 @@ |
411 | 411 | } |
412 | 412 | |
413 | 413 | // Send public headers |
414 | | - if ( $wgVaryOnXFPForAPI ) { |
| 414 | + if ( $wgVaryOnXFP ) { |
415 | 415 | header( 'Vary: Accept-Encoding, X-Forwarded-Proto' ); |
416 | 416 | if ( $wgUseXVO ) { |
417 | 417 | // Bleeeeegh. Our header setting system sucks |
Index: branches/wmf/1.17wmf1/includes/DefaultSettings.php |
— | — | @@ -1767,10 +1767,12 @@ |
1768 | 1768 | |
1769 | 1769 | /** Add X-Forwarded-Proto to the Vary and X-Vary-Options headers for API |
1770 | 1770 | * requests and RSS/Atom feeds. Use this if you have an SSL termination setup |
1771 | | - * and need to split the cache between HTTP and HTTPS for API and feed requests |
1772 | | - * in order to prevent cache pollution. This does not affect 'normal' requests. |
| 1771 | + * and need to split the cache between HTTP and HTTPS for API requests, |
| 1772 | + * feed requests and HTTP redirect responses in order to prevent cache |
| 1773 | + * pollution. This does not affect 'normal' requests to index.php other than |
| 1774 | + * HTTP redirects. |
1773 | 1775 | */ |
1774 | | -$wgVaryOnXFPForAPI = false; |
| 1776 | +$wgVaryOnXFP = false; |
1775 | 1777 | |
1776 | 1778 | /** |
1777 | 1779 | * Internal server name as known to Squid, if different. Example: |
Property changes on: branches/wmf/1.17wmf1/includes/DefaultSettings.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1778 | 1780 | Merged /trunk/phase3/includes/DefaultSettings.php:r98755 |