Skip to content

Commit

Permalink
Set content-type before sending image data for a valid response
Browse files Browse the repository at this point in the history
  • Loading branch information
JoKneeMo committed Dec 12, 2022
1 parent 97e0390 commit 82d64bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion results/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -221,4 +220,5 @@ function drawImage($speedtest)
exit(1);
}

header('Content-Type: image/png');
drawImage($speedtest);

0 comments on commit 82d64bf

Please sign in to comment.