From: Reed Loden Date: Mon, 5 Jul 2010 06:13:54 +0000 (-0500) Subject: Bug 574327 - Map image/x-png to image/png (to fix IE's uploads) X-Git-Tag: bugzilla-3.6.2~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=669abe07484cf5fa7d86168992bbbfe3181344b6;p=thirdparty%2Fbugzilla.git Bug 574327 - Map image/x-png to image/png (to fix IE's uploads) [r=LpSolit a=LpSolit] --- diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index f3210425f0..0139922fad 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -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