mirror of
https://github.com/librespeed/speedtest.git
synced 2024-05-10 18:54:52 +00:00
Set content-type before sending image data for a valid response
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user