MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/68009
Change subject: Remove custom caching headers ...................................................................... Remove custom caching headers According to commit summary[1], caching of responses to frontend proxies was introduced as a stopgap. It doesn't seem needed now, MF should rely on core for headers as much as possible. ---- [1] http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/MobileFrontend/MobileFrontend.php?revision=93405&view=markup Change-Id: Ie7b3259fbddcbd71efd76c30dfe613d22ccca6a4 --- M includes/MobileFrontend.body.php 1 file changed, 0 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/09/68009/1 diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php index 9d822e0..aa61d95 100644 --- a/includes/MobileFrontend.body.php +++ b/includes/MobileFrontend.body.php @@ -31,33 +31,7 @@ $this->setDefaultLogo(); - $this->disableCaching(); $this->sendHeaders(); - - wfProfileOut( __METHOD__ ); - } - - /** - * Disables caching if the request is coming from a trusted proxy - */ - private function disableCaching() { - wfProfileIn( __METHOD__ ); - - // Fetch the REMOTE_ADDR and check if it's a trusted proxy. - // Is this enough, or should we actually step through the entire - // X-FORWARDED-FOR chain? - if ( isset( $_SERVER['REMOTE_ADDR'] ) ) { - $ip = IP::canonicalize( $_SERVER['REMOTE_ADDR'] ); - } else { - $ip = null; - } - - $request = $this->getRequest(); - if ( wfIsConfiguredProxy( $ip ) ) { - $request->response()->header( 'Cache-Control: no-cache, must-revalidate' ); - $request->response()->header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); - $request->response()->header( 'Pragma: no-cache' ); - } wfProfileOut( __METHOD__ ); } -- To view, visit https://gerrit.wikimedia.org/r/68009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7b3259fbddcbd71efd76c30dfe613d22ccca6a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: MaxSem <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
