r82042 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82041‎ | r82042 | r82043 >
Date:23:41, 12 February 2011
Author:catrope
Status:ok
Tags:
Comment:
Never serve 304s from RL in debug mode. This causes inadvertent caching of debug responses
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoader.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoader.php
@@ -381,7 +381,8 @@
382382 // Some clients send "timestamp;length=123". Strip the part after the first ';'
383383 // so we get a valid timestamp.
384384 $ims = $context->getRequest()->getHeader( 'If-Modified-Since' );
385 - if ( $ims !== false ) {
 385+ // Never send 304s in debug mode
 386+ if ( $ims !== false && !$context->getDebug() ) {
386387 $imsTS = strtok( $ims, ';' );
387388 if ( $mtime <= wfTimestamp( TS_UNIX, $imsTS ) ) {
388389 // There's another bug in ob_gzhandler (see also the comment at

Sign-offs

UserFlagDate
Hasharinspected21:26, 15 February 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r820431.17wmf1: MFT r82042catrope23:42, 12 February 2011

Status & tagging log