From bb2283bf4e0ff6d9fe3438f36fbb4c703c3e16b2 Mon Sep 17 00:00:00 2001 From: Scott MacVicar Date: Tue, 17 Mar 2009 03:25:57 +0000 Subject: [PATCH] MFH Fix bug #47359 - Use the official unofficial mimetype for bmp files, this stops IE from getting confused. --- ext/gd/tests/image_type_to_mime_type_basic.phpt | 2 +- ext/gd/tests/image_type_to_mime_type_variation3.phpt | 2 +- ext/standard/image.c | 2 +- ext/standard/tests/image/getimagesize.phpt | 2 +- ext/standard/tests/image/getimagesize_basic.phpt | 2 +- ext/standard/tests/image/image_type_to_mime_type.phpt | 2 +- .../tests/image/image_type_to_mime_type_variation3.phpt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/gd/tests/image_type_to_mime_type_basic.phpt b/ext/gd/tests/image_type_to_mime_type_basic.phpt index 7384c46328..5199fd2c46 100644 --- a/ext/gd/tests/image_type_to_mime_type_basic.phpt +++ b/ext/gd/tests/image_type_to_mime_type_basic.phpt @@ -49,7 +49,7 @@ string(10) "image/jpeg" string(9) "image/png" string(29) "application/x-shockwave-flash" string(9) "image/psd" -string(9) "image/bmp" +string(14) "image/x-ms-bmp" string(10) "image/tiff" string(10) "image/tiff" string(24) "application/octet-stream" diff --git a/ext/gd/tests/image_type_to_mime_type_variation3.phpt b/ext/gd/tests/image_type_to_mime_type_variation3.phpt index a1c042a060..8383facb09 100644 --- a/ext/gd/tests/image_type_to_mime_type_variation3.phpt +++ b/ext/gd/tests/image_type_to_mime_type_variation3.phpt @@ -39,7 +39,7 @@ string\(29\) "application\/x-shockwave-flash" string\(9\) "image\/psd" -- Iteration 6 -- -string\(9\) "image\/bmp" +string\(14\) "image\/x-ms-bmp" -- Iteration 7 -- string\(10\) "image\/tiff" diff --git a/ext/standard/image.c b/ext/standard/image.c index 9f76de953c..cbafe00315 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -1133,7 +1133,7 @@ PHPAPI char * php_image_type_to_mime_type(int image_type) case IMAGE_FILETYPE_PSD: return "image/psd"; case IMAGE_FILETYPE_BMP: - return "image/bmp"; + return "image/x-ms-bmp"; case IMAGE_FILETYPE_TIFF_II: case IMAGE_FILETYPE_TIFF_MM: return "image/tiff"; diff --git a/ext/standard/tests/image/getimagesize.phpt b/ext/standard/tests/image/getimagesize.phpt index 46003cffac..ab79c9c768 100644 --- a/ext/standard/tests/image/getimagesize.phpt +++ b/ext/standard/tests/image/getimagesize.phpt @@ -37,7 +37,7 @@ array(11) { ["bits"]=> int(24) ["mime"]=> - string(9) "image/bmp" + string(14) "image/x-ms-bmp" } ["test1pix.jp2"]=> array(7) { diff --git a/ext/standard/tests/image/getimagesize_basic.phpt b/ext/standard/tests/image/getimagesize_basic.phpt index 63ae334066..4d47225818 100644 --- a/ext/standard/tests/image/getimagesize_basic.phpt +++ b/ext/standard/tests/image/getimagesize_basic.phpt @@ -138,7 +138,7 @@ array(6) { ["bits"]=> int(24) ["mime"]=> - string(9) "image/bmp" + string(14) "image/x-ms-bmp" } array(0) { } diff --git a/ext/standard/tests/image/image_type_to_mime_type.phpt b/ext/standard/tests/image/image_type_to_mime_type.phpt index 94aabba0b9..5d94a6fe5d 100644 --- a/ext/standard/tests/image/image_type_to_mime_type.phpt +++ b/ext/standard/tests/image/image_type_to_mime_type.phpt @@ -27,7 +27,7 @@ image_type_to_mime_type() --EXPECT-- array(11) { ["test1pix.bmp"]=> - string(9) "image/bmp" + string(14) "image/x-ms-bmp" ["test1pix.jp2"]=> string(9) "image/jp2" ["test1pix.jpc"]=> diff --git a/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt b/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt index 5b432f4899..192f23dcee 100755 --- a/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt +++ b/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt @@ -39,7 +39,7 @@ string\(29\) "application\/x-shockwave-flash" string\(9\) "image\/psd" -- Iteration 6 -- -string\(9\) "image\/bmp" +string\(14\) "image\/x-ms-bmp" -- Iteration 7 -- string\(10\) "image\/tiff" -- 2.50.1