aboutsummaryrefslogtreecommitdiffstats
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
parentb4254213214ef10288d7f46a10e64ede8e56c30c (diff)
downloadurpmi-proxy-5e7021646a11b3a45ebc18aae9007955f0e06044.tar
urpmi-proxy-5e7021646a11b3a45ebc18aae9007955f0e06044.tar.gz
urpmi-proxy-5e7021646a11b3a45ebc18aae9007955f0e06044.tar.bz2
urpmi-proxy-5e7021646a11b3a45ebc18aae9007955f0e06044.tar.xz
urpmi-proxy-5e7021646a11b3a45ebc18aae9007955f0e06044.zip
version 0.5.1: hotfix for binmode for STDOUTHEADmaster
-rw-r--r--VERSION2
-rwxr-xr-xurpmi-proxy.cgi4
2 files changed, 4 insertions, 2 deletions
diff --git a/VERSION b/VERSION
index 8f0916f..4b9fcbe 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.5.0
+0.5.1
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;