aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-04-15 09:49:44 +0000
committerlpsolit%gmail.com <>2009-04-15 09:49:44 +0000
commit044450e8cce5a3b61cd52ba3d0d40277ae3098c9 (patch)
tree1619904b8ea8cb1192e9614b7ed48f3a57a6a26f
parentBump version number post-release. (diff)
downloadbugzilla-044450e8cce5a3b61cd52ba3d0d40277ae3098c9.tar.gz
bugzilla-044450e8cce5a3b61cd52ba3d0d40277ae3098c9.tar.bz2
bugzilla-044450e8cce5a3b61cd52ba3d0d40277ae3098c9.zip
Bug 486685: MIME type override for attachments lost in HTTP redirect - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wicked a=LpSolit
-rwxr-xr-xattachment.cgi4
1 files changed, 4 insertions, 0 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 53fe4a6d0..1f5dd1e52 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -324,6 +324,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/) {