Index: branches/wmf/1.18wmf1/includes/Feed.php |
— | — | @@ -239,13 +239,13 @@ |
240 | 240 | * but can also be called separately. |
241 | 241 | */ |
242 | 242 | public function httpHeaders() { |
243 | | - global $wgOut, $wgVaryOnXFPForAPI; |
| 243 | + global $wgOut, $wgVaryOnXFP; |
244 | 244 | |
245 | 245 | # We take over from $wgOut, excepting its cache header info |
246 | 246 | $wgOut->disable(); |
247 | 247 | $mimetype = $this->contentType(); |
248 | 248 | header( "Content-type: $mimetype; charset=UTF-8" ); |
249 | | - if ( $wgVaryOnXFPForAPI ) { |
| 249 | + if ( $wgVaryOnXFP ) { |
250 | 250 | $wgOut->addVaryHeader( 'X-Forwarded-Proto' ); |
251 | 251 | } |
252 | 252 | $wgOut->sendCacheControl(); |
Index: branches/wmf/1.18wmf1/includes/OutputPage.php |
— | — | @@ -1785,7 +1785,7 @@ |
1786 | 1786 | * the object, let's actually output it: |
1787 | 1787 | */ |
1788 | 1788 | public function output() { |
1789 | | - global $wgLanguageCode, $wgDebugRedirects, $wgMimeType; |
| 1789 | + global $wgLanguageCode, $wgDebugRedirects, $wgMimeType, $wgVaryOnXFP; |
1790 | 1790 | |
1791 | 1791 | if( $this->mDoNothing ) { |
1792 | 1792 | return; |
— | — | @@ -1805,6 +1805,9 @@ |
1806 | 1806 | } |
1807 | 1807 | $this->mLastModified = wfTimestamp( TS_RFC2822 ); |
1808 | 1808 | } |
| 1809 | + if ( $wgVaryOnXFP ) { |
| 1810 | + $this->addVaryHeader( 'X-Forwarded-Proto' ); |
| 1811 | + } |
1809 | 1812 | $this->sendCacheControl(); |
1810 | 1813 | |
1811 | 1814 | $response->header( "Content-Type: text/html; charset=utf-8" ); |
Property changes on: branches/wmf/1.18wmf1/includes/OutputPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1812 | 1815 | Merged /trunk/phase3/includes/OutputPage.php:r98755 |
Index: branches/wmf/1.18wmf1/includes/api/ApiMain.php |
— | — | @@ -399,7 +399,7 @@ |
400 | 400 | } |
401 | 401 | |
402 | 402 | protected function sendCacheHeaders() { |
403 | | - global $wgUseXVO, $wgOut, $wgVaryOnXFPForAPI; |
| 403 | + global $wgUseXVO, $wgOut, $wgVaryOnXFP; |
404 | 404 | $response = $this->getRequest()->response(); |
405 | 405 | |
406 | 406 | if ( $this->mCacheMode == 'private' ) { |
— | — | @@ -408,10 +408,10 @@ |
409 | 409 | } |
410 | 410 | |
411 | 411 | if ( $this->mCacheMode == 'anon-public-user-private' ) { |
412 | | - $xfp = $wgVaryOnXFPForAPI ? ', X-Forwarded-Proto' : ''; |
| 412 | + $xfp = $wgVaryOnXFP ? ', X-Forwarded-Proto' : ''; |
413 | 413 | $response->header( 'Vary: Accept-Encoding, Cookie' . $xfp ); |
414 | 414 | if ( $wgUseXVO ) { |
415 | | - if ( $wgVaryOnXFPForAPI ) { |
| 415 | + if ( $wgVaryOnXFP ) { |
416 | 416 | $wgOut->addVaryHeader( 'X-Forwarded-Proto' ); |
417 | 417 | } |
418 | 418 | $response->header( $wgOut->getXVO() ); |
— | — | @@ -430,7 +430,7 @@ |
431 | 431 | } |
432 | 432 | |
433 | 433 | // Send public headers |
434 | | - if ( $wgVaryOnXFPForAPI ) { |
| 434 | + if ( $wgVaryOnXFP ) { |
435 | 435 | $response->header( 'Vary: Accept-Encoding, X-Forwarded-Proto' ); |
436 | 436 | if ( $wgUseXVO ) { |
437 | 437 | // Bleeeeegh. Our header setting system sucks |
Index: branches/wmf/1.18wmf1/includes/DefaultSettings.php |
— | — | @@ -1743,10 +1743,12 @@ |
1744 | 1744 | |
1745 | 1745 | /** Add X-Forwarded-Proto to the Vary and X-Vary-Options headers for API |
1746 | 1746 | * requests and RSS/Atom feeds. Use this if you have an SSL termination setup |
1747 | | - * and need to split the cache between HTTP and HTTPS for API and feed requests |
1748 | | - * in order to prevent cache pollution. This does not affect 'normal' requests. |
| 1747 | + * and need to split the cache between HTTP and HTTPS for API requests, |
| 1748 | + * feed requests and HTTP redirect responses in order to prevent cache |
| 1749 | + * pollution. This does not affect 'normal' requests to index.php other than |
| 1750 | + * HTTP redirects. |
1749 | 1751 | */ |
1750 | | -$wgVaryOnXFPForAPI = false; |
| 1752 | +$wgVaryOnXFP = false; |
1751 | 1753 | |
1752 | 1754 | /** |
1753 | 1755 | * Internal server name as known to Squid, if different. Example: |