diff options
author | lpsolit%gmail.com <> | 2009-04-15 09:45:40 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2009-04-15 09:45:40 +0000 |
commit | cab5e09a3904889386b219f9144066098a69c21b (patch) | |
tree | d0eef9f6673662debc1edd4607e903611f7737de /attachment.cgi | |
parent | Bug 486057: Title of product_name_already_in_use is inconsistent with its des... (diff) | |
download | bugzilla-cab5e09a3904889386b219f9144066098a69c21b.tar.gz bugzilla-cab5e09a3904889386b219f9144066098a69c21b.tar.bz2 bugzilla-cab5e09a3904889386b219f9144066098a69c21b.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
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-x | attachment.cgi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/attachment.cgi b/attachment.cgi index 53d189b93..f6549841f 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -252,6 +252,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/) { |