Commit 6896e961 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 408446: Non-text attachments were mangled by "binmode STDOUT, ':utf8'"

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
parent 45c7f0a1
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment