* Workaround for mysterious problem with bogus epoch If-Last-Modified reqs
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 4 Jul 2005 22:06:39 +0000 (22:06 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 4 Jul 2005 22:06:39 +0000 (22:06 +0000)
RELEASE-NOTES
includes/OutputPage.php

index b5f26a5..4761a8a 100644 (file)
@@ -468,6 +468,7 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new.
 * Removed language conversion support from Icelandic
 * (bug 2616) Fix proportional image scaling, giving correct height
 * (bug 2640) Include width and height attributes on unscaled images
+* Workaround for mysterious problem with bogus epoch If-Last-Modified reqs
 
 
 === Caveats ===
index 336539b..1316919 100644 (file)
@@ -113,7 +113,8 @@ class OutputPage {
                        # Wed, 20 Aug 2003 06:51:19 GMT; length=5202
                        # this breaks strtotime().
                        $modsince = preg_replace( '/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"] );
-                       $ismodsince = wfTimestamp( TS_MW, strtotime( $modsince ) );
+                       $modsinceTime = strtotime( $modsince );
+                       $ismodsince = wfTimestamp( TS_MW, $modsinceTime ? $modsinceTime : 1 );
                        wfDebug( "-- client send If-Modified-Since: " . $modsince . "\n", false );
                        wfDebug( "--  we might send Last-Modified : $lastmod\n", false );
                        if( ($ismodsince >= $timestamp ) && $wgUser->validateCache( $ismodsince ) ) {