* In Skin::doEditSectionLink omitting the parameters $tooltip and $lang is
deprecated. For the $lang parameter, types other than Language are
deprecated.
+* The $wgUseKeyHeader configuration option and the
+ OutputPage::getKeyHeader() method have been deprecated; the relevant
+ draft IETF spec expired without becoming a standard.
=== Other changes in 1.32 ===
* (T198811) The following tables have had their UNIQUE indexes turned into
/**
* Send the Key HTTP header for better caching.
- * See https://datatracker.ietf.org/doc/draft-fielding-http-key/ for details.
+ * See https://datatracker.ietf.org/doc/draft-ietf-httpbis-key/ for details.
* @since 1.27
+ * @deprecated in 1.32, the IETF spec expired without becoming a standard.
*/
$wgUseKeyHeader = false;
* Get a complete Key header
*
* @return string
+ * @deprecated in 1.32; the IETF spec for this header expired w/o becoming
+ * a standard.
*/
public function getKeyHeader() {
+ wfDeprecated( '$wgUseKeyHeader', '1.32' );
+
$cvCookies = $this->getCacheVaryCookies();
$cookiesOption = [];
continue;
}
+ // XXX Note that this code is not strictly correct: we
+ // do a case-insensitive match in
+ // LanguageConverter::getHeaderVariant() while the
+ // (abandoned, draft) spec for the `Key` header only
+ // allows case-sensitive matches. To match the logic
+ // in LanguageConverter::getHeaderVariant() we should
+ // also be looking at fallback variants and deprecated
+ // mediawiki-internal codes, as well as BCP 47
+ // normalized forms.
+
$aloption[] = "substr=$variant";
// IE and some other browsers use BCP 47 standards in their Accept-Language header,
->will( $this->returnValue( $cookies ) );
TestingAccessWrapper::newFromObject( $op )->mVaryHeader = [];
+ $this->hideDeprecated( '$wgUseKeyHeader' );
foreach ( $calls as $call ) {
$op->addVaryHeader( ...$call );
}
/**
* @dataProvider provideAddAcceptLanguage
* @covers OutputPage::addAcceptLanguage
+ * @covers OutputPage::getKeyHeader
*/
public function testAddAcceptLanguage(
$code, array $variants, array $expected, array $options = []
// This will run addAcceptLanguage()
$op->sendCacheControl();
+ $this->hideDeprecated( '$wgUseKeyHeader' );
$keyHeader = $op->getKeyHeader();
if ( !$expected ) {