From: lpsolit%gmail.com <> Date: Wed, 15 Apr 2009 09:47:11 +0000 (+0000) Subject: Bug 486685: MIME type override for attachments lost in HTTP redirect - Patch by FrÃ... X-Git-Tag: bugzilla-3.4rc1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11b9c697fd582f0cb6e34444a46caa072710a03d;p=thirdparty%2Fbugzilla.git Bug 486685: MIME type override for attachments lost in HTTP redirect - Patch by Frédéric Buclin r=wicked a=LpSolit --- diff --git a/attachment.cgi b/attachment.cgi index 45d4d7fda0..89ef451525 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -266,6 +266,10 @@ sub view { my $bug_id = $attachment->bug_id; $attachbase =~ s/%bugid%/$bug_id/; my $path = 'attachment.cgi?id=' . $attachment->id; + # The user is allowed to override the content type of the attachment. + if (defined $cgi->param('content_type')) { + $path .= '&content_type=' . url_quote($cgi->param('content_type')); + } # Make sure the attachment is served from the correct server. if ($cgi->self_url !~ /^\Q$attachbase\E/) {