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

From: Date: Wed, 08 May 2019 09:32:24 +0000
Subject: Bug #77990 [Opn->Nab]: 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-220777@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 Updated by: cmb@php.net Reported by: peter279k at gmail dot com Summary: The mime should be image/x-ms-bmp, not image/bmp in getimagesize function -Status: Open +Status: Not a bug Type: Bug -Package: Output Control +Package: GetImageSize related Operating System: Ubuntu 16.04.6 LTS PHP Version: 7.3.5 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The change to getimagesize() is documented in the migration guide[1]. The fact that mime_content_type() still returns the obsolete mime type should be reported against upstream[2]. [1] <https://www.php.net/manual/en/migration73.incompatible.php#migration73.incompatible.core.misc> [2] <http://www.darwinsys.com/file/> Previous Comments: ------------------------------------------------------------------------ [2019-05-08 09:30:33] spam2 at rhsoft dot net PHP does nothing here, it calls libraries and depending on the library version you get the old x- stuff or the finalized mime-type - you are supposed to know the valid results in your code and test against both ------------------------------------------------------------------------ [2019-05-08 09:28:04] peter279k at gmail dot com To spam2@rhsoft.net, according to the wiki you provide, it seems that the BMP has two internet mime content type. They will be image/bmp, or image/x-bmp. Shouldn't we consider/concern this? And make this consistency or add some messages on official PHP doc? ------------------------------------------------------------------------ [2019-05-08 09:21:14] spam2 at rhsoft dot net because https://www.php.net/manual/en/function.mime-content-type.php is part of the fileinfo extension and https://www.php.net/manual/en/function.getimagesize.php is part of the gd extension which are completly different worlds ------------------------------------------------------------------------ [2019-05-08 09:18:40] peter279k at gmail dot com I wonder why the mime content type has different result for mime_content_type and getimagesize functions? ------------------------------------------------------------------------ [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 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=77990 -- Edit this bug report at https://bugs.php.net/bug.php?id=77990&edit=1

« previous php.bugs (#220777) next »