Use binmode to set stdout to raw when printing uploaded files.

The bug involved uploaded images not being decoded correctly.
This commit is contained in:
Alex Schroeder
2012-07-25 13:42:22 +02:00
parent 16198f8784
commit d4edb159ae

View File

@@ -3132,6 +3132,7 @@ sub DoDownload {
if @UploadTypes and not $allowed{$type};
print GetHttpHeader($type, $ts, undef, $encoding);
require MIME::Base64;
binmode(STDOUT, "raw");
print MIME::Base64::decode($data);
} else {
print GetHttpHeader('text/plain', $ts);