Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/251734
Change subject: Apply wfBCP47() to HTTP response header Content-Language ...................................................................... Apply wfBCP47() to HTTP response header Content-Language See https://tools.ietf.org/html/rfc7231#section-3.1.3 for Content-Language. This references https://tools.ietf.org/html/rfc5646 aka BCP 47. Example: https://crh.wikipedia.org/wiki/Ba%C5%9F_Saife should contain Content-language: crh-Latn instead of Content-language: crh-latn Change-Id: Ice4f40911c3761c2542430935bc1898bc4e7a4d4 --- M includes/OutputPage.php M includes/cache/HTMLFileCache.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/34/251734/1 diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 81724c5..46f844b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2274,7 +2274,7 @@ ob_start(); $response->header( 'Content-type: ' . $config->get( 'MimeType' ) . '; charset=UTF-8' ); - $response->header( 'Content-language: ' . $config->get( 'LanguageCode' ) ); + $response->header( 'Content-language: ' . wfBCP47( $config->get( 'LanguageCode' ) ) ); // Avoid Internet Explorer "compatibility view" in IE 8-10, so that // jQuery etc. can work correctly. diff --git a/includes/cache/HTMLFileCache.php b/includes/cache/HTMLFileCache.php index 483eaa5..6df32e4 100644 --- a/includes/cache/HTMLFileCache.php +++ b/includes/cache/HTMLFileCache.php @@ -148,7 +148,7 @@ $context->getOutput()->sendCacheControl(); header( "Content-Type: $wgMimeType; charset=UTF-8" ); - header( "Content-Language: $wgLanguageCode" ); + header( 'Content-Language: ' . wfBCP47( $wgLanguageCode ) ); if ( $this->useGzip() ) { if ( wfClientAcceptsGzip() ) { header( 'Content-Encoding: gzip' ); -- To view, visit https://gerrit.wikimedia.org/r/251734 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice4f40911c3761c2542430935bc1898bc4e7a4d4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader <gerritpatchuploa...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits