Sfoglia il codice sorgente

Revert "Set content-type before sending image data for a valid response"

This reverts commit 82d64bff9692bc0ee13a43d1ff6253440fd5ac55.
JoKneeMo 1 anno fa
parent
commit
11f698b376
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      results/index.php

+ 1 - 1
results/index.php

@@ -212,6 +212,7 @@ function drawImage($speedtest)
     imagefttext($im, $FONT_WATERMARK_SIZE, 0, $POSITION_X_WATERMARK, $POSITION_Y_WATERMARK, $TEXT_COLOR_WATERMARK, $FONT_WATERMARK, $WATERMARK_TEXT);
 
     // send the image to the browser
+    header('Content-Type: image/png');
     imagepng($im);
 }
 
@@ -220,5 +221,4 @@ if (!is_array($speedtest)) {
     exit(1);
 }
 
-header('Content-Type: image/png');
 drawImage($speedtest);