Fix logic error in IMS check introduced in r72940. Was sending 304 even for modified...
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 2 Oct 2010 16:54:53 +0000 (16:54 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 2 Oct 2010 16:54:53 +0000 (16:54 +0000)
includes/ResourceLoader.php

index 7935ada..363b3a1 100644 (file)
@@ -293,7 +293,7 @@ class ResourceLoader {
 
                // If there's an If-Modified-Since header, respond with a 304 appropriately
                $ims = $context->getRequest()->getHeader( 'If-Modified-Since' );
-               if ( $ims !== false && $mtime >= wfTimestamp( TS_UNIX, $ims ) ) {
+               if ( $ims !== false && $mtime <= wfTimestamp( TS_UNIX, $ims ) ) {
                        header( 'HTTP/1.0 304 Not Modified' );
                        header( 'Status: 304 Not Modified' );
                        wfProfileOut( __METHOD__ );