From 6b6997dcf9036e372b4c7bc5476c9d8f9145d2c2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 19 Apr 2019 14:58:34 -0700 Subject: [PATCH] Accept new "MediaWiki-ChronologyClientId" HTTP header This is not used when the ID is already in "cpPosIndex". Also, prefix the "ChronologyProtection" header with "MediaWiki-". The header is currently usused but might be useful for services in the future. Bug: T212550 Change-Id: Ia871e95966d3550bac3dc4b2edb58e18359af7d9 --- includes/Setup.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Setup.php b/includes/Setup.php index bcdc1d57a2..bf363ab50e 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -736,9 +736,10 @@ $cpPosInfo = LBFactory::getCPInfoFromCookieValue( MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->setRequestInfo( [ 'IPAddress' => $wgRequest->getIP(), 'UserAgent' => $wgRequest->getHeader( 'User-Agent' ), - 'ChronologyProtection' => $wgRequest->getHeader( 'ChronologyProtection' ), + 'ChronologyProtection' => $wgRequest->getHeader( 'MediaWiki-ChronologyProtection' ), 'ChronologyPositionIndex' => $wgRequest->getInt( 'cpPosIndex', $cpPosInfo['index'] ), 'ChronologyClientId' => $cpPosInfo['clientId'] + ?? $wgRequest->getHeader( 'MediaWiki-ChronologyClientId' ) ] ); unset( $cpPosInfo ); // Make sure that object caching does not undermine the ChronologyProtector improvements -- 2.20.1