Bug ID: 61359
           Summary: Resource Loader tryRespondLastModified has a poorly
                    written loop when clearing the output buffer.
           Product: MediaWiki
           Version: 1.19.1
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: major
          Priority: Unprioritized
         Component: ResourceLoader
       Web browser: ---
   Mobile Platform: ---

Applies to:
protected function tryRespondLastModified( ResourceLoaderContext $context,
$mtime )

The function is small, so I'll let the code speak for itself. Basically, in the
existing version the value retuned by ob_get_level() will count down as $i
counts up - this results in only half of the ob levels getting cleared.
Ultimately, this leads to bytes in the body section of the 304 (which is
illegal and chokes browsers).

Here is the existing code: 
for ( $i = 0; $i < ob_get_level(); $i++ ) {

Here is what it should be:
$tmp = ob_get_level();
for ( $i = 0; $i < $tmp; $i++ ) {

You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to