diff options
author | mkanat%bugzilla.org <> | 2008-01-06 09:59:42 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-01-06 09:59:42 +0100 |
commit | 6896e961efd997683992e547853b91e739ee6bc5 (patch) | |
tree | d1266853516b6cfa845ad3e40deaeeffb272c82d /attachment.cgi | |
parent | 45c7f0a197c573f3aadc4152f421406f9bd16025 (diff) | |
download | bugzilla-6896e961efd997683992e547853b91e739ee6bc5.tar.gz bugzilla-6896e961efd997683992e547853b91e739ee6bc5.tar.xz |
Bug 408446: Non-text attachments were mangled by "binmode STDOUT, ':utf8'"
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-x | attachment.cgi | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/attachment.cgi b/attachment.cgi index 768653c31..6fd238c2f 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -246,6 +246,9 @@ sub view { print $cgi->header(-type=>"$contenttype; name=\"$filename\"", -content_disposition=> "inline; filename=\"$filename\"", -content_length => $attachment->datasize); + if (Bugzilla->params->{'utf8'}) { + binmode STDOUT, ':raw'; # Turn off UTF8 encoding. + } print $attachment->data; } |