dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Make mediawiki.special.pageLanguage work again"
[lhc/web/wiklou.git]
/
includes
/
OutputPage.php
diff --git
a/includes/OutputPage.php
b/includes/OutputPage.php
index
97165b4
..
93ba702
100644
(file)
--- a/
includes/OutputPage.php
+++ b/
includes/OutputPage.php
@@
-21,6
+21,7
@@
*/
use MediaWiki\Logger\LoggerFactory;
*/
use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\Session\SessionManager;
use WrappedString\WrappedString;
/**
use WrappedString\WrappedString;
/**
@@
-1977,11
+1978,9
@@
class OutputPage extends ContextSource {
if ( $cookies === null ) {
$config = $this->getConfig();
$cookies = array_merge(
if ( $cookies === null ) {
$config = $this->getConfig();
$cookies = array_merge(
+ SessionManager::singleton()->getVaryCookies(),
array(
array(
- $config->get( 'CookiePrefix' ) . 'Token',
- $config->get( 'CookiePrefix' ) . 'LoggedOut',
- "forceHTTPS",
- session_name()
+ 'forceHTTPS',
),
$config->get( 'CacheVaryCookies' )
);
),
$config->get( 'CacheVaryCookies' )
);
@@
-2033,6
+2032,9
@@
class OutputPage extends ContextSource {
* @return string
*/
public function getVaryHeader() {
* @return string
*/
public function getVaryHeader() {
+ foreach ( SessionManager::singleton()->getVaryHeaders() as $header => $options ) {
+ $this->addVaryHeader( $header, $options );
+ }
return 'Vary: ' . join( ', ', array_keys( $this->mVaryHeader ) );
}
return 'Vary: ' . join( ', ', array_keys( $this->mVaryHeader ) );
}
@@
-2050,6
+2052,10
@@
class OutputPage extends ContextSource {
}
$this->addVaryHeader( 'Cookie', $cookiesOption );
}
$this->addVaryHeader( 'Cookie', $cookiesOption );
+ foreach ( SessionManager::singleton()->getVaryHeaders() as $header => $options ) {
+ $this->addVaryHeader( $header, $options );
+ }
+
$headers = array();
foreach ( $this->mVaryHeader as $header => $option ) {
$newheader = $header;
$headers = array();
foreach ( $this->mVaryHeader as $header => $option ) {
$newheader = $header;
@@
-2173,8
+2179,8
@@
class OutputPage extends ContextSource {
if ( $this->mEnableClientCache ) {
if (
if ( $this->mEnableClientCache ) {
if (
- $config->get( 'UseSquid' ) &&
session_id() == '' && !$this->isPrintable
() &&
- $this->mCdnMaxage != 0 && !$this->haveCacheVaryCookies()
+ $config->get( 'UseSquid' ) &&
!SessionManager::getGlobalSession()->isPersistent
() &&
+
!$this->isPrintable() &&
$this->mCdnMaxage != 0 && !$this->haveCacheVaryCookies()
) {
if ( $config->get( 'UseESI' ) ) {
# We'll purge the proxy cache explicitly, but require end user agents
) {
if ( $config->get( 'UseESI' ) ) {
# We'll purge the proxy cache explicitly, but require end user agents