From 01ea7adb3cef28e6daf5a308cd65da85a67979da Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 15 Apr 2009 09:48:31 +0000 Subject: [PATCH] =?utf8?q?Bug=20486685:=20MIME=20type=20override=20for=20a?= =?utf8?q?ttachments=20lost=20in=20HTTP=20redirect=20-=20Patch=20by=20Fr?= =?utf8?q?=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r?= =?utf8?q?=3Dwicked=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- attachment.cgi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/attachment.cgi b/attachment.cgi index 951e995eac..90c5d90605 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -264,6 +264,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/) { -- 2.47.2