From 82d64bff9692bc0ee13a43d1ff6253440fd5ac55 Mon Sep 17 00:00:00 2001 From: JoKneeMo <421625+JoKneeMo@users.noreply.github.com> Date: Sun, 11 Dec 2022 22:57:06 -0500 Subject: [PATCH] Set content-type before sending image data for a valid response --- results/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/results/index.php b/results/index.php index ad6beca..2505058 100755 --- a/results/index.php +++ b/results/index.php @@ -212,7 +212,6 @@ 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); } @@ -221,4 +220,5 @@ if (!is_array($speedtest)) { exit(1); } +header('Content-Type: image/png'); drawImage($speedtest);