Bug #77990 [Opn]: The mime should be image/x-ms-bmp, not image/bmp in getimagesize function

From: Date: Wed, 08 May 2019 09:18:40 +0000
Subject: Bug #77990 [Opn]: The mime should be image/x-ms-bmp, not image/bmp in getimagesize function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220771@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77990&edit=1 ID: 77990 User updated by: peter279k at gmail dot com Reported by: peter279k at gmail dot com Summary: The mime should be image/x-ms-bmp, not image/bmp in getimagesize function Status: Open Type: Bug Package: Output Control Operating System: Ubuntu 16.04.6 LTS PHP Version: 7.3.5 Block user comment: N Private report: N New Comment: I wonder why the mime content type has different result for mime_content_type and getimagesize functions? Previous Comments: ------------------------------------------------------------------------ [2019-05-08 09:11:12] spam2 at rhsoft dot net no, it should not because the x/- stuff is temporary / not standarized https://en.wikipedia.org/wiki/BMP_file_format Internet media type image/bmp, image/x-bmp ------------------------------------------------------------------------ [2019-05-08 08:55:08] peter279k at gmail dot com Description: ------------ The getimagesize function mime result should be enhanced. The mime content type should be image/x-ms-bmp, not image/bmp. Test script: --------------- <?php echo mime_content_type('php.bmp') . "\n"; echo getimagesize('php.bmp')['mime'] . "\n"; Expected result: ---------------- image/x-ms-bmp image/x-ms-bmp Actual result: -------------- image/x-ms-bmp image/bmp ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77990&edit=1

« previous php.bugs (#220771) next »