X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FAjaxResponse.php;h=faff021859344d15169eb2dd9c9ec7bec10319be;hb=bb2e73ccf376f4f3a78d02104805af7c7aa80e45;hp=323c5d30ac2778bde6a3a4116e1c12cba2cffa38;hpb=008428ce9e5f41995b5fa759d8cc3a4aa3cf6a89;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/AjaxResponse.php b/includes/AjaxResponse.php index 323c5d30ac..faff021859 100644 --- a/includes/AjaxResponse.php +++ b/includes/AjaxResponse.php @@ -55,7 +55,7 @@ class AjaxResponse { /** * HTTP response code - * @var string $mResponseCode + * @var int|string $mResponseCode */ private $mResponseCode; @@ -114,7 +114,7 @@ class AjaxResponse { /** * Set the HTTP response code - * @param string $code + * @param int|string $code */ function setResponseCode( $code ) { $this->mResponseCode = $code; @@ -182,16 +182,7 @@ class AjaxResponse { if ( $this->mConfig->get( 'UseCdn' ) ) { # Expect explicit purge of the proxy cache, but require end user agents # to revalidate against the proxy on each visit. - # Surrogate-Control controls our CDN, Cache-Control downstream caches - - if ( $this->mConfig->get( 'UseESI' ) ) { - wfDeprecated( '$wgUseESI = true', '1.33' ); - header( 'Surrogate-Control: max-age=' . $this->mCacheDuration . ', content="ESI/1.0"' ); - header( 'Cache-Control: s-maxage=0, must-revalidate, max-age=0' ); - } else { - header( 'Cache-Control: s-maxage=' . $this->mCacheDuration . ', must-revalidate, max-age=0' ); - } - + header( 'Cache-Control: s-maxage=' . $this->mCacheDuration . ', must-revalidate, max-age=0' ); } else { # Let the client do the caching. Cache is not purged. header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $this->mCacheDuration ) . " GMT" );