From: Antoine Musso Date: Thu, 27 Apr 2006 21:46:03 +0000 (+0000) Subject: Fix #5315: "Expires: -1" HTTP header not strictly RFC valid X-Git-Tag: 1.31.0-rc.0~57353 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=caa4b4557757fbdaa0377f21203ed94c9e8d6f29;p=lhc%2Fweb%2Fwiklou.git Fix #5315: "Expires: -1" HTTP header not strictly RFC valid --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 94c09a8477..5dcfbfb5c6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -130,6 +130,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Improvements to update scripts; print out the version, check for superuser credentials before attempting a connection, and produce a friendlier error if the connection fails * (bug 5005): Fix XHTML output. +* (bug 5315) "Expires: -1" HTTP header made strictly valid (using 1970 date). == Compatibility == diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 4aecedbfb0..d6e653acb0 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -445,7 +445,7 @@ class OutputPage { # We do want clients to cache if they can, but they *must* check for updates # on revisiting the page. wfDebug( "** private caching; {$this->mLastModified} **\n", false ); - header( "Expires: -1" ); + header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' ); header( "Cache-Control: private, must-revalidate, max-age=0" ); } if($this->mLastModified) header( "Last-modified: {$this->mLastModified}" ); @@ -454,7 +454,7 @@ class OutputPage { # In general, the absence of a last modified header should be enough to prevent # the client from using its cache. We send a few other things just to make sure. - header( 'Expires: -1' ); + header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' ); header( 'Cache-Control: no-cache, no-store, max-age=0, must-revalidate' ); header( 'Pragma: no-cache' ); }