]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 574327 - Map image/x-png to image/png (to fix IE's uploads)
authorReed Loden <reed@reedloden.com>
Mon, 5 Jul 2010 06:13:54 +0000 (01:13 -0500)
committerReed Loden <reed@reedloden.com>
Mon, 5 Jul 2010 06:13:54 +0000 (01:13 -0500)
[r=LpSolit a=LpSolit]

Bugzilla/Attachment.pm

index f3210425f08122c0ae5c57d4358908d96f2029d5..0139922fadf34ad49c52e2bebb7197ea0e767775 100644 (file)
@@ -989,6 +989,12 @@ sub get_content_type {
             $cgi->param('ispatch', 1);
             $content_type = 'text/plain';
         }
+
+        # Internet Explorer sends image/x-png for PNG images,
+        # so convert that to image/png to match other browsers.
+        if ($content_type eq 'image/x-png') {
+            $content_type = 'image/png';
+        }
     }
     elsif ($cgi->param('contenttypemethod') eq 'list') {
         # The user selected a content type from the list, so use their