mirror of
https://github.com/librespeed/speedtest.git
synced 2026-08-04 06:39:45 +00:00
Set content-type before sending image data for a valid response
This commit is contained in:
parent
97e0390680
commit
82d64bff96
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue