Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -547,6 +547,7 @@ |
548 | 548 | $this->getMsg(); |
549 | 549 | $this->disableCaching(); |
550 | 550 | $this->sendXDeviceVaryHeader(); |
| 551 | + $this->sendApplicationVersionVaryHeader(); |
551 | 552 | $this->checkUserStatus(); |
552 | 553 | ob_start( array( $this, 'DOMParse' ) ); |
553 | 554 | } |
— | — | @@ -649,6 +650,16 @@ |
650 | 651 | } |
651 | 652 | wfProfileOut( __METHOD__ ); |
652 | 653 | } |
| 654 | + |
| 655 | + private function sendApplicationVersionVaryHeader() { |
| 656 | + global $wgOut, $wgRequest; |
| 657 | + wfProfileIn( __METHOD__ ); |
| 658 | + if ( !empty( $_SERVER['HTTP_APPLICATION_VERSION'] ) ) { |
| 659 | + $wgRequest->response()->header( 'Application_Version: ' . $_SERVER['HTTP_APPLICATION_VERSION'] ); |
| 660 | + $wgOut->addVaryHeader( 'Application_Version' ); |
| 661 | + } |
| 662 | + wfProfileOut( __METHOD__ ); |
| 663 | + } |
653 | 664 | |
654 | 665 | /** |
655 | 666 | * @return string |