Sort $wgLogActionsHandlers/$wgLogActions/$wgLogHeaders
[lhc/web/wiklou.git] / thumb.php
index 40f3754..b530bb5 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -89,7 +89,6 @@ function wfThumbHandle404() {
 function wfStreamThumb( array $params ) {
        global $wgVaryOnXFP;
 
-
        $headers = array(); // HTTP headers to send
 
        $fileName = isset( $params['f'] ) ? $params['f'] : '';
@@ -235,7 +234,7 @@ function wfStreamThumb( array $params ) {
                $imsUnix = strtotime( $imsString );
                MediaWiki\restoreWarnings();
                if ( wfTimestamp( TS_UNIX, $img->getTimestamp() ) <= $imsUnix ) {
-                       HttpStatus::header( 304  );
+                       HttpStatus::header( 304 );
                        return;
                }
        }
@@ -571,7 +570,7 @@ function wfThumbError( $status, $msg ) {
        } else {
                $debug = '';
        }
-       echo <<<EOT
+       $content = <<<EOT
 <!DOCTYPE html>
 <html><head>
 <meta charset="UTF-8" />
@@ -587,4 +586,6 @@ $debug
 </html>
 
 EOT;
+       header( 'Content-Length: ' . strlen( $content ) );
+       echo $content;
 }