r100353 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100352‎ | r100353 | r100354 >
Date:17:36, 20 October 2011
Author:preilly
Status:deferred
Tags:
Comment:
add vary support for application version of ios application
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -547,6 +547,7 @@
548548 $this->getMsg();
549549 $this->disableCaching();
550550 $this->sendXDeviceVaryHeader();
 551+ $this->sendApplicationVersionVaryHeader();
551552 $this->checkUserStatus();
552553 ob_start( array( $this, 'DOMParse' ) );
553554 }
@@ -649,6 +650,16 @@
650651 }
651652 wfProfileOut( __METHOD__ );
652653 }
 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+ }
653664
654665 /**
655666 * @return string

Follow-up revisions

RevisionCommit summaryAuthorDate
r100354mft r100353preilly17:37, 20 October 2011

Status & tagging log