aboutsummaryrefslogtreecommitdiffstats
path: root/urpmi-proxy.cgi
diff options
context:
space:
mode:
authorMaarten Vanraes <alien@mageia.org>2020-02-01 15:49:55 +0100
committerMaarten Vanraes <alien@mageia.org>2020-02-01 15:49:55 +0100
commit5e7021646a11b3a45ebc18aae9007955f0e06044 (patch)
treeef74104a6fc1e4bde0c9953de1b277845cdb63cd /urpmi-proxy.cgi
parentb4254213214ef10288d7f46a10e64ede8e56c30c (diff)
downloadurpmi-proxy-master.tar
urpmi-proxy-master.tar.gz
urpmi-proxy-master.tar.bz2
urpmi-proxy-master.tar.xz
urpmi-proxy-master.zip
version 0.5.1: hotfix for binmode for STDOUTHEADmaster
Diffstat (limited to 'urpmi-proxy.cgi')
-rwxr-xr-xurpmi-proxy.cgi4
1 files changed, 3 insertions, 1 deletions
diff --git a/urpmi-proxy.cgi b/urpmi-proxy.cgi
index fa7ccca..583a6b1 100755
--- a/urpmi-proxy.cgi
+++ b/urpmi-proxy.cgi
@@ -447,6 +447,7 @@ sub flush_buffer {
${$data->{file_sent}} += ${$data->{pos}};
}
# output
+ binmode(STDOUT);
print ${$data->{buffer}};
# clear buffer
${$data->{buffer}} = '';
@@ -487,7 +488,7 @@ sub write_function {
($sec, $usec) = gettimeofday;
print STDERR "[$sec,$usec]: write: print STDOUT\n" if $debug;
# output
- binmode STDOUT;
+ binmode(STDOUT);
print $ptr;
($sec, $usec) = gettimeofday;
print STDERR "[$sec,$usec]: write: return\n" if $debug;
@@ -523,6 +524,7 @@ sub return_file {
print "Last-Modified: " . $t . "\r\n";
print "\r\n";
binmode(FILE);
+ binmode(STDOUT);
my $buf;
while (read(FILE, $buf, 1024)) {
print $buf;