Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -404,7 +404,7 @@ |
405 | 405 | } |
406 | 406 | |
407 | 407 | protected function sendCacheHeaders() { |
408 | | - global $wgUseXVO, $wgOut, $wgVaryOnXFP; |
| 408 | + global $wgUseXVO, $wgVaryOnXFP; |
409 | 409 | $response = $this->getRequest()->response(); |
410 | 410 | |
411 | 411 | if ( $this->mCacheMode == 'private' ) { |
— | — | @@ -416,11 +416,12 @@ |
417 | 417 | $xfp = $wgVaryOnXFP ? ', X-Forwarded-Proto' : ''; |
418 | 418 | $response->header( 'Vary: Accept-Encoding, Cookie' . $xfp ); |
419 | 419 | if ( $wgUseXVO ) { |
| 420 | + $out = $this->getOutput(); |
420 | 421 | if ( $wgVaryOnXFP ) { |
421 | | - $wgOut->addVaryHeader( 'X-Forwarded-Proto' ); |
| 422 | + $out->addVaryHeader( 'X-Forwarded-Proto' ); |
422 | 423 | } |
423 | | - $response->header( $wgOut->getXVO() ); |
424 | | - if ( $wgOut->haveCacheVaryCookies() ) { |
| 424 | + $response->header( $out->getXVO() ); |
| 425 | + if ( $out->haveCacheVaryCookies() ) { |
425 | 426 | // Logged in, mark this request private |
426 | 427 | $response->header( 'Cache-Control: private' ); |
427 | 428 | return; |